A go utility collection for encryption/hash
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)
}