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.

21 lines
617 B

package crypto
import (
"fmt"
"testing"
)
func TestCrypto_AesEncrypt(t *testing.T) {
fmt.Println(cryptoTool.AesEncrypt("xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy"))
//8xSzAOz2WjeZXfaxbW4ARKB63ta9EOeGp/wvmzHfUvA4Gd8AG32SeTlqqmEsinNO <nil>
fmt.Println(cryptoTool.AesEncrypt("xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy", "1234567812345678"))
//XCbjg7uyoIVeBvW0Wbt6vhtCgHFY3fFscbgkL8Ff7ZnbRduIT6qd/nw/qHsF1TEA <nil>
}
func TestCrypto_AesDecrypt(t *testing.T) {
fmt.Println(cryptoTool.AesDecrypt("XCbjg7uyoIVeBvW0Wbt6vhtCgHFY3fFscbgkL8Ff7ZnbRduIT6qd/nw/qHsF1TEA", "1234567812345678"))
//xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy <nil>
}