LookAtMySuitBot/js/node_modules/jose/dist/browser/runtime/subtle_rsaes.js

13 lines
397 B
JavaScript
Raw Normal View History

2023-12-24 20:08:39 -05:00
import { JOSENotSupported } from '../util/errors.js';
export default function subtleRsaEs(alg) {
switch (alg) {
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512':
return 'RSA-OAEP';
default:
throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
}
}