Skip to content

Commit

Permalink
Merge pull request #229 from oasisprotocol/CedarMist/hashtests-fix
Browse files Browse the repository at this point in the history
contracts: hashing tests weren't running, which meant sha384 error wasn't caught
  • Loading branch information
CedarMist authored Nov 26, 2023
2 parents 9fdd2bb + 669d49a commit 5f83294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/contracts/Sapphire.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library Sapphire {
address internal constant SHA512 =
0x0100000000000000000000000000000000000102;
address internal constant SHA384 =
0x0100000000000000000000000000000000000103;
0x0100000000000000000000000000000000000104;

type Curve25519PublicKey is bytes32;
type Curve25519SecretKey is bytes32;
Expand Down
6 changes: 3 additions & 3 deletions contracts/test/hashes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ describe('Hashes', () => {
}

it('SHA512-256', async () => {
testHashes('SHA512-256', contract.testSHA512_256.bind(contract));
await testHashes('SHA512-256', contract.testSHA512_256.bind(contract));
});

it('SHA512', async () => {
testHashes('SHA512', contract.testSHA512.bind(contract));
await testHashes('SHA512', contract.testSHA512.bind(contract));
});

it('SHA384', async () => {
testHashes('SHA384', contract.testSHA384.bind(contract));
await testHashes('SHA384', contract.testSHA384.bind(contract));
});
});

0 comments on commit 5f83294

Please sign in to comment.