You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
303 B

package aes
import (
"fmt"
"testing"
)
func Test_CBC(t *testing.T) {
key, _ := GenerateRandomKey(16)
fmt.Printf("key:%s\n", key)
token := AesEncryptCBC("asdjoiqwjeio", key)
fmt.Printf("encrypted:%s", token)
origData := AesDecryptCBC(token, key)
fmt.Printf("encrypted:%s", string(origData))
}