Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
20
node_modules/jose/dist/browser/lib/cek.js
generated
vendored
Normal file
20
node_modules/jose/dist/browser/lib/cek.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { JOSENotSupported } from '../util/errors.js';
|
||||
import random from '../runtime/random.js';
|
||||
export function bitLength(alg) {
|
||||
switch (alg) {
|
||||
case 'A128GCM':
|
||||
return 128;
|
||||
case 'A192GCM':
|
||||
return 192;
|
||||
case 'A256GCM':
|
||||
case 'A128CBC-HS256':
|
||||
return 256;
|
||||
case 'A192CBC-HS384':
|
||||
return 384;
|
||||
case 'A256CBC-HS512':
|
||||
return 512;
|
||||
default:
|
||||
throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);
|
||||
}
|
||||
}
|
||||
export default (alg) => random(new Uint8Array(bitLength(alg) >> 3));
|
||||
Loading…
Add table
Add a link
Reference in a new issue