Ida/pbkdf2 #2

Closed
idaapayo wants to merge 8 commits from idaapayo/funga-eth:Ida/pbkdf2 into master
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 4a4f76b19c - Show all commits

View File

@ -36,7 +36,7 @@ default_scrypt_kdfparams = {
'salt': os.urandom(32).hex(),
}
pbkdf2_kdfparams = {
default_pbkdf2_kdfparams = {

Chnage this to default_pbkdf2_kdfparams

Chnage this to `default_pbkdf2_kdfparams`
'c': 100000,
'dklen': 32,
'prf': 'sha256',
@ -64,7 +64,7 @@ class Hashes:
dklen=dklen)
@staticmethod
def from_pbkdf2(kdfparams=pbkdf2_kdfparams, passphrase=''):
def from_pbkdf2(kdfparams=default_pbkdf2_kdfparams, passphrase=''):
if kdfparams['prf'] == 'hmac-sha256':
kamikazechaser marked this conversation as resolved Outdated

prf key-value from keystore files could also be hmac-sha256, which isn't a valid param for hashlib.pbkdf2_hmac default to sha256 instead.

`prf` key-value from keystore files could also be `hmac-sha256`, which isn't a valid param for `hashlib.pbkdf2_hmac` default to `sha256` instead.
kdfparams['prf'].replace('hmac-sha256','sha256')

View File

@ -4,7 +4,7 @@ import logging
import os
# external imports
from hexathon import strip_0x, add_0x
from hexathon import strip_0x

Revert these changes

Revert these changes
from pathlib import Path
import sys
@ -16,7 +16,7 @@ print(sys.path)
from funga.eth.signer import EIP155Signer
from funga.eth.keystore.dict import DictKeystore
# import dicttest as d
from funga.eth.cli.handle import SignRequestHandler
from funga.eth.transaction import EIP155Transaction