update demos according to changed naming
This commit is contained in:
parent
fc7eeac218
commit
746fd583c9
@ -22,7 +22,7 @@ int main(void) {
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
// given a specific size name, get and print its size
|
// given a specific size name, get and print its size
|
||||||
char name[] = "ecc_key_struct_size";
|
char name[] = "ecc_key";
|
||||||
int size;
|
int size;
|
||||||
rc = crypt_get_size(name, &size);
|
rc = crypt_get_size(name, &size);
|
||||||
printf("\n size of '%s' is %d \n\n", name, size);
|
printf("\n size of '%s' is %d \n\n", name, size);
|
||||||
|
18
demos/demo_dynamic.py
Normal file → Executable file
18
demos/demo_dynamic.py
Normal file → Executable file
@ -126,13 +126,13 @@ if 1:
|
|||||||
print '\n selected sizes:'
|
print '\n selected sizes:'
|
||||||
|
|
||||||
names = [
|
names = [
|
||||||
'rijndael_key_struct_size',
|
'rijndael_key',
|
||||||
'rsa_key_struct_size',
|
'rsa_key',
|
||||||
'symmetric_CTR_struct_size',
|
'symmetric_CTR',
|
||||||
'twofish_key_struct_size',
|
'twofish_key',
|
||||||
'ecc_point_struct_size',
|
'ecc_point',
|
||||||
'gcm_state_struct_size',
|
'gcm_state',
|
||||||
'sha512_state_struct_size',
|
'sha512_state',
|
||||||
]
|
]
|
||||||
for name in names:
|
for name in names:
|
||||||
size_value = c_int(0)
|
size_value = c_int(0)
|
||||||
@ -171,8 +171,8 @@ def _get_size(name):
|
|||||||
rc = LTC.crypt_get_size(name, byref(size))
|
rc = LTC.crypt_get_size(name, byref(size))
|
||||||
return size.value
|
return size.value
|
||||||
|
|
||||||
sha256_state_struct_size = _get_size('sha256_state_struct_size')
|
sha256_state_struct_size = _get_size('sha256_state')
|
||||||
sha512_state_struct_size = _get_size('sha512_state_struct_size')
|
sha512_state_struct_size = _get_size('sha512_state')
|
||||||
|
|
||||||
class SHA256(object):
|
class SHA256(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user