Skip to content

Commit 23604a4

Browse files
committed
readme
1 parent 782868b commit 23604a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Use if you need KEM (encrypt/decrypt).
8181

8282
```ts
8383
import * as rsa from 'micro-rsa-dsa-dh/rsa.js';
84+
import { sha256 } from '@noble/hashes/sha2';
8485
const alice = rsa.keygen(2048);
8586
const oaep = rsa.OAEP(sha256, rsa.mgf1(sha256));
8687
const msg = new Uint8Array([1, 2, 3]);
@@ -94,6 +95,7 @@ Use if you need signatures (sign/verify).
9495

9596
```ts
9697
import * as rsa from 'micro-rsa-dsa-dh/rsa.js';
98+
import { sha256 } from '@noble/hashes/sha2';
9799
const alice = rsa.keygen(2048);
98100
const pss = rsa.PSS(sha256, rsa.mgf1(sha256));
99101
const msg = new Uint8Array([1, 2, 3]);
@@ -166,6 +168,7 @@ Same as ECDSA, but with big numbers. Cons:
166168

167169
```ts
168170
import * as dsa from 'micro-rsa-dsa-dh/dsa.js';
171+
import { sha256 } from '@noble/hashes/sha2';
169172
// 1. Params
170173
// Carol generates random params
171174
const carolParams = dsa.genDSAParams(2048, 256, sha256, 1);

0 commit comments

Comments
 (0)