added keymanager test
This commit is contained in:
parent
b24c683f5f
commit
ef6bb8c1e9
6 changed files with 60 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
|||
import nacl.signing, nacl.encoding, nacl.pwhash
|
||||
import onionrexceptions
|
||||
from onionrutils import bytesconverter
|
||||
from etc import onionrvalues
|
||||
def generate_pub_key():
|
||||
'''Generate a Ed25519 public key pair, return tuple of base32encoded pubkey, privkey'''
|
||||
private_key = nacl.signing.SigningKey.generate()
|
||||
|
@ -9,7 +10,7 @@ def generate_pub_key():
|
|||
|
||||
def generate_deterministic(passphrase, bypassCheck=False):
|
||||
'''Generate a Ed25519 public key pair from a password'''
|
||||
passStrength = 25
|
||||
passStrength = onionrvalues.PASSWORD_LENGTH
|
||||
passphrase = bytesconverter.str_to_bytes(passphrase) # Convert to bytes if not already
|
||||
# Validate passphrase length
|
||||
if not bypassCheck:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue