X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libgo%2Fgo%2Fcrypto%2Faes%2Faes_test.go;h=3505d33e960844af1c7542a7c2faa54bbcf6285d;hp=2136d447d0163ea2bd29732ab2dca20034364e4e;hb=7da93e24295c8b313ecdcedee0b8bde70b335e61;hpb=f86a7907050666ce7cab2890b353619f83d6c98b diff --git a/libgo/go/crypto/aes/aes_test.go b/libgo/go/crypto/aes/aes_test.go index 2136d447d01..3505d33e960 100644 --- a/libgo/go/crypto/aes/aes_test.go +++ b/libgo/go/crypto/aes/aes_test.go @@ -348,3 +348,17 @@ func TestCipherDecrypt(t *testing.T) { } } } + +func BenchmarkEncrypt(b *testing.B) { + b.StopTimer() + tt := encryptTests[0] + c, err := NewCipher(tt.key) + if err != nil { + panic("NewCipher") + } + out := make([]byte, len(tt.in)) + b.StartTimer() + for i := 0; i < b.N; i++ { + c.Encrypt(out, tt.in) + } +}