Skip to content

Commit

Permalink
camelCase fixing and builtin folder
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineFONDEUR committed May 28, 2024
1 parent 0175ca1 commit cfafdda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//The hash function implementation comes from the rust one of Lambdawork:
//https://github.com/lambdaclass/lambdaworks/blob/main/crypto/src/hash/pedersen/mod.rs#L43

function PEDERSEN(x: bigint, y: bigint): bigint {
function pedersen(x: bigint, y: bigint): bigint {
var xBool: boolean[] = toBitsLe(x);
var yBool: boolean[] = toBitsLe(y);
var hash: AffinePoint = SHIFT_POINT;
Expand Down
4 changes: 4 additions & 0 deletions src/ui/Code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ function DECODE_INSTRUCTION(encodedInstruction: string): [any[]] {
return [[""]];
}
}

function PEDERSEN(x: number | string, y: number | string): number | string {
return pedersen(BigInt(x), BigInt(y)).toString(16);
}

0 comments on commit cfafdda

Please sign in to comment.