示例#1
0
文件: main_test.go 项目: idada/frontd
func BenchmarkDecryptText(b *testing.B) {
	for i := 0; i < b.N; i++ {
		_, err := aes256cbc.DecryptBase64(_secret, _expectAESCiphertext)
		if err != nil {
			panic(err)
		}
	}
}
示例#2
0
文件: main_test.go 项目: idada/frontd
// TestTextDecryptAES ---
func TestTextDecryptAES(t *testing.T) {
	dec, err := aes256cbc.DecryptBase64(_secret, _expectAESCiphertext)
	if err != nil {
		panic(err)
	}
	if !bytes.Equal(dec, _echoServerAddr) {
		panic(errors.New("not match"))
	}
}