-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eddsa-poseidon): fixes carry handling of g function by introducin…
…g original blake-hash imp This commit replaces the existing implementation of blake-hash with a TS wrapper over original blake-hash package and exposing required methods along with specified types for each re #344
- Loading branch information
Showing
5 changed files
with
49 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
declare module "blake-hash" { | ||
type BlakeVariant = "blake224" | "blake256" | "blake384" | "blake512" | ||
|
||
export interface BlakeHash { | ||
update(data: Buffer | Uint8Array): BlakeHash | ||
digest(encoding?: "hex" | "binary"): Buffer | string | ||
} | ||
|
||
/** | ||
* Creates an instance of a BLAKE hash function. | ||
* @param variant The desired BLAKE variant ('blake224', 'blake256', 'blake384', or 'blake512'). | ||
* @returns An instance of the hash function. | ||
*/ | ||
export default function createBlakeHash(variant: BlakeVariant): BlakeHash | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
declare module "blake-hash" { | ||
type BlakeVariant = "blake224" | "blake256" | "blake384" | "blake512" | ||
|
||
export interface BlakeHash { | ||
update(data: Buffer | Uint8Array): BlakeHash | ||
digest(encoding?: "hex" | "binary"): Buffer | string | ||
} | ||
|
||
/** | ||
* Creates an instance of a BLAKE hash function. | ||
* @param variant The desired BLAKE variant ('blake224', 'blake256', 'blake384', or 'blake512'). | ||
* @returns An instance of the hash function. | ||
*/ | ||
export default function createBlakeHash(variant: BlakeVariant): BlakeHash | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters