package main
import (
"fmt"
"github.com/urban-lib/cbc"
)
func main() {
// must be len(key) == 32
key := []byte("qazxswedcvfrtgbnhy12312dasasdwd9")
message := []byte(`hello world`)
// Encryption
encryptedMessage, err := cbc.Encrypt(message, key)
if err != nil {
panic(err)
}
fmt.Println(encryptedMessage)
// Decryption
decryptedMessage, err := cbc.Decrypt(encryptedMessage, key)
if err != nil {
panic(err)
}
fmt.Println(decryptedMessage)
}
-
Notifications
You must be signed in to change notification settings - Fork 0
urban-lib/cbc
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published