source: camellia/trunk/speed.py @ 7

Revision 7, 352 bytes checked in by sgk, 13 years ago (diff)

速度の計測。

  • Property svn:executable set to *
Line 
1#!/usr/bin/python
2
3import sys
4import camellia
5
6plain = '0' * 16
7key = "0123456789abcdef"
8
9if len(sys.argv) == 2:
10  key = sys.argv[1]
11
12keylen = len(key) * 8
13assert keylen in (128, 192, 256), "Key string should be 16, 24, 32 charaters."
14
15keytable = camellia.Ekeygen(keylen, key)
16
17for x in xrange(100000):
18  camellia.EncryptBlock(keylen, plain, keytable)
Note: See TracBrowser for help on using the repository browser.