File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ Use if you need KEM (encrypt/decrypt).
81
81
82
82
``` ts
83
83
import * as rsa from ' micro-rsa-dsa-dh/rsa.js' ;
84
+ import { sha256 } from ' @noble/hashes/sha2' ;
84
85
const alice = rsa .keygen (2048 );
85
86
const oaep = rsa .OAEP (sha256 , rsa .mgf1 (sha256 ));
86
87
const msg = new Uint8Array ([1 , 2 , 3 ]);
@@ -94,6 +95,7 @@ Use if you need signatures (sign/verify).
94
95
95
96
``` ts
96
97
import * as rsa from ' micro-rsa-dsa-dh/rsa.js' ;
98
+ import { sha256 } from ' @noble/hashes/sha2' ;
97
99
const alice = rsa .keygen (2048 );
98
100
const pss = rsa .PSS (sha256 , rsa .mgf1 (sha256 ));
99
101
const msg = new Uint8Array ([1 , 2 , 3 ]);
@@ -166,6 +168,7 @@ Same as ECDSA, but with big numbers. Cons:
166
168
167
169
``` ts
168
170
import * as dsa from ' micro-rsa-dsa-dh/dsa.js' ;
171
+ import { sha256 } from ' @noble/hashes/sha2' ;
169
172
// 1. Params
170
173
// Carol generates random params
171
174
const carolParams = dsa .genDSAParams (2048 , 256 , sha256 , 1 );
You can’t perform that action at this time.
0 commit comments