Export ECC private keys

This commit is contained in:
Legrandin 2016-01-27 08:44:43 +01:00
parent c7b491de3f
commit c67b7a1752
25 changed files with 379 additions and 49 deletions

View file

@ -86,8 +86,8 @@ def PBKDF1(password, salt, dkLen, count=1000, hashAlgo=None):
digest = pHash.digest_size
if dkLen>digest:
raise TypeError("Selected hash algorithm has a too short digest (%d bytes)." % digest)
if len(salt)!=8:
raise ValueError("Salt is not 8 bytes long.")
if len(salt) != 8:
raise ValueError("Salt is not 8 bytes long (%d bytes instead)." % len(salt))
for i in xrange(count-1):
pHash = pHash.new(pHash.digest())
return pHash.digest()[:dkLen]