/cryptutil

A go utility collection for encryption/hash

Primary LanguageGoGNU General Public License v3.0GPL-3.0

CryptUtil

Travis Go Report Card

A go utility collection for encryption/hash

Usage

AES encryption/decryption Example:

package main

import (
	"fmt"
	"github.com/festum/cryptutil/aes"
)

func main() {
	c := aes.Cryptor{}
	c.Init()

	sampleText := "Sample text"
	encryptedText, err := c.Encrypt([]byte(sampleText))
	if err != nil {
		fmt.Println(err)
	}
	decryptedText, err := c.Decrypt(encryptedText)
	if err != nil {
		fmt.Println(err)
	}

	fmt.Printf("Decypted text: %s\n", decryptedText)
}