~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 The Go Authors. All rights reserved.
 
2
// Use of this source code is governed by a BSD-style
 
3
// license that can be found in the LICENSE file.
 
4
 
 
5
package rc2
 
6
 
 
7
import (
 
8
        "testing"
 
9
)
 
10
 
 
11
func BenchmarkEncrypt(b *testing.B) {
 
12
        r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
 
13
        b.ResetTimer()
 
14
        var src [8]byte
 
15
        for i := 0; i < b.N; i++ {
 
16
                r.Encrypt(src[:], src[:])
 
17
        }
 
18
}
 
19
 
 
20
func BenchmarkDecrypt(b *testing.B) {
 
21
        r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64)
 
22
        b.ResetTimer()
 
23
        var src [8]byte
 
24
        for i := 0; i < b.N; i++ {
 
25
                r.Decrypt(src[:], src[:])
 
26
        }
 
27
}