mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-12-08 05:19:46 +00:00
Export ECC private keys
This commit is contained in:
parent
c7b491de3f
commit
c67b7a1752
25 changed files with 379 additions and 49 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue