root/camellia/trunk/speed.py

リビジョン 9, 313 bytes (コミッタ: sgk, コミット時期: 3 年 前)

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

  • svn:executable 属性の設定値: *
Line 
1 #!/usr/bin/python
2
3 import sys
4 import camellia
5
6 plain = '0' * 16
7 key = "0123456789abcdef"
8
9 if len(sys.argv) == 2:
10   key = sys.argv[1]
11
12 assert len(key) in (16, 24, 32), "Key string should be 16, 24, 32 charaters."
13
14 keytable = camellia.Ekeygen(key)
15
16 for x in xrange(100000):
17   camellia.EncryptBlock(plain, keytable)
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。