jose/dist/browser/runtime/webcrypto.js
2021-10-14 12:24:49 +02:00

8 lines
255 B
JavaScript

import globalThis from './global.js';
export default globalThis.crypto;
export function isCryptoKey(key) {
if (typeof globalThis.CryptoKey === 'undefined') {
return false;
}
return key != null && key instanceof globalThis.CryptoKey;
}