Update m31900.pm

adapt mode's unit-test for longer CT sections
pull/3859/head
red 8 months ago committed by GitHub
parent a1ff328ae9
commit 61944481b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,7 +46,7 @@ sub module_generate_hash
my $pt = "[{\"type\":\"HD Key Tree\",\"data\":{\"mnemonic\":\"ocean hidden kidney famous rich season gloom husband spring convince attitude boy\",\"numberOfAccounts\":1,\"hdPath\":\"m/44'/60'/0'/0\"}}]";
my $ct1 = substr ($cipher->encrypt ($pt), 0, 16);
my $ct1 = substr ($cipher->encrypt ($pt), 0, 32);
my $hash = sprintf ('$metamaskMobile$%s$%s$%s', $salt_b64, $iv, encode_base64 ($ct1, ""));
@ -79,7 +79,7 @@ sub module_verify_hash
return unless length $salt_b64 == 16;
return unless length $iv_bin == 16;
return unless length $ct_bin == 16;
return unless length $ct_bin == 32;
my $word_packed = pack_if_HEX_notation ($word);

Loading…
Cancel
Save