File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ export abstract class KeyObject {
148
148
const opts = options as any ;
149
149
if ( opts . format !== undefined ) {
150
150
validateString ( opts . format , 'options.format' ) ;
151
+ } else {
152
+ options . format = 'buffer' ;
151
153
}
152
154
if ( opts . type !== undefined ) validateString ( opts . type , 'options.type' ) ;
153
155
if ( this . type === 'private' ) {
@@ -166,8 +168,6 @@ export abstract class KeyObject {
166
168
}
167
169
}
168
170
169
- options . format ??= 'buffer' ;
170
-
171
171
const ret = cryptoImpl . exportKey (
172
172
this [ kHandle ] ,
173
173
options as InnerExportOptions
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ jsg::BufferSource randomPrime(jsg::Lock& js,
67
67
" options.add must not be bigger than size of the requested prime" );
68
68
}
69
69
70
- // Generating random primes uses the prng internally.
70
+ // Generating random primes uses the PRNG internally.
71
71
// Make sure the CSPRNG is properly seeded.
72
72
JSG_REQUIRE (
73
73
workerd::api::CSPRNG (nullptr ), Error, " Error while generating prime (bad random state)" );
You can’t perform that action at this time.
0 commit comments