source: camellia/trunk/speed.py @ 9

Revision 9, 313 bytes checked in by sgk, 13 years ago (diff)

API変更。keyBitLength引数を無くした。

  • 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
12assert len(key) in (16, 24, 32), "Key string should be 16, 24, 32 charaters."
13
14keytable = camellia.Ekeygen(key)
15
16for x in xrange(100000):
17  camellia.EncryptBlock(plain, keytable)
Note: See TracBrowser for help on using the repository browser.