Пример #1
0
func BenchmarkDecryptText(b *testing.B) {
	for i := 0; i < b.N; i++ {
		_, err := aes256cbc.DecryptBase64(_secret, _expectAESCiphertext)
		if err != nil {
			panic(err)
		}
	}
}
Пример #2
0
// 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"))
	}
}