-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Sphereon-Opensource/develop
New release
- Loading branch information
Showing
47 changed files
with
1,029 additions
and
275 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { generatePrivateKeyHex } from '../src/functions' | ||
import { generateEbsiPrivateKeyHex } from '../src/functions' | ||
|
||
describe('functions: key generator', () => { | ||
it('Secp256k1 should generate random keys', () => { | ||
const key1 = generatePrivateKeyHex() | ||
const key2 = generatePrivateKeyHex() | ||
const key3 = generatePrivateKeyHex() | ||
const key1 = generateEbsiPrivateKeyHex() | ||
const key2 = generateEbsiPrivateKeyHex() | ||
const key3 = generateEbsiPrivateKeyHex() | ||
expect(key1).toBeDefined() | ||
expect(key2).toBeDefined() | ||
expect(key3).toBeDefined() | ||
expect(key1).not.toBe(key2) | ||
expect(key2).not.toBe(key3) | ||
}) | ||
it('Secp256k1 should result in hex length 64', () => { | ||
expect(generatePrivateKeyHex().length).toBe(64) | ||
expect(generateEbsiPrivateKeyHex().length).toBe(64) | ||
}) | ||
}) |
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
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
Oops, something went wrong.