Browse Source

added return when note with given id not exists in modify_note(); increased iterations of kdf to 10.000

master
T. Meissner 10 years ago
parent
commit
032fd0f884
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      python_3_oop/chapter02/menu.py

+ 2
- 1
python_3_oop/chapter02/menu.py View File

@ -79,6 +79,7 @@ Notebook Menu
if memo:
if not self.notebook.modify_memo(id, memo):
print("Note with id {0} doesn't exist.".format(id))
return
if tags:
if not self.notebook.modify_tags(id, tags):
print("Note with id {0} doesn't exist.".format(id))
@ -120,7 +121,7 @@ Notebook Menu
algorithm = hashes.SHA256(),
length = 32,
salt = self.salt.encode('utf-8'),
iterations = 1000,
iterations = 10000,
backend = default_backend()
)
return base64.urlsafe_b64encode(kdf.derive(passphrase.encode('utf-8')))


Loading…
Cancel
Save