Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu committed Feb 18, 2024
1 parent faa828f commit f561a1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/crypto/bls.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { stringToBytes } from '@scure/base';
import { bytesToHex } from '@noble/hashes/utils';
import { hexToBuffer } from '../utils/buffer';
import * as bls from './bls';

Expand Down Expand Up @@ -33,7 +32,7 @@ describe('bls', () => {

it('generates signature correctly', async () => {
const sk = bls.secretKeyFromBytes(skStr);
expect(bytesToHex(bls.sign(msg, sk))).toEqual(sigStr);
expect(bls.sign(msg, sk)).toEqual(hexToBuffer(sigStr));
});

it('verifies signature correctly', async () => {
Expand All @@ -48,7 +47,7 @@ describe('bls', () => {
const pk = bls.publicKeyFromBytes(pkStr);
const pkBytes = bls.publicKeyToBytes(pk);

expect(bytesToHex(bls.signProofOfPossession(pkBytes, sk))).toEqual(popStr);
expect(bls.signProofOfPossession(pkBytes, sk)).toEqual(hexToBuffer(popStr));
});

it('verifies proof of possession correctly', async () => {
Expand Down

0 comments on commit f561a1a

Please sign in to comment.