Skip to content

Commit

Permalink
fixup! feat(crypto): added new crypto package
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelCastilloB committed Jan 13, 2023
1 parent e55b944 commit c9244ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/crypto/src/Bip32/Bip32PrivateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CHAIN_CODE_SIZE = 32;
*/
const clampScalar = (scalar: Buffer): Buffer => {
scalar[0] &= 0b1111_1000;
scalar[31] &= 0b0011_1111;
scalar[31] &= 0b0001_1111;
scalar[31] |= 0b0100_0000;
return scalar;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/Ed25519e/Ed25519PrivateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const EXTENDED_ED25519_PRIVATE_KEY_LENGTH = 64;
*/
const clampScalar = (scalar: Buffer): Buffer => {
scalar[0] &= 0b1111_1000;
scalar[31] &= 0b0011_1111;
scalar[31] &= 0b0001_1111;
scalar[31] |= 0b0100_0000;
return scalar;
};
Expand Down

0 comments on commit c9244ac

Please sign in to comment.