jose/dist/browser/runtime/webcrypto.js
2021-11-11 17:14:02 +01:00

12 lines
301 B
JavaScript

export default crypto;
export function isCryptoKey(key) {
try {
return (key != null &&
typeof key.extractable === 'boolean' &&
typeof key.algorithm.name === 'string' &&
typeof key.type === 'string');
}
catch (_a) {
return false;
}
}