Package Exports
- @aws-crypto/supports-web-crypto
- @aws-crypto/supports-web-crypto/build/main/index.js
- @aws-crypto/supports-web-crypto/build/module/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aws-crypto/supports-web-crypto) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@aws-crypto/supports-web-crypto
Functions to check web crypto support for browsers.
Usage
import {supportsWebCrypto} from '@aws-crypto/supports-web-crypto';
if (supportsWebCrypto(window)) {
// window.crypto.subtle.encrypt will exist
}
supportsWebCrypto
Used to make sure window.crypto.subtle exists and implements crypto functions
as well as a cryptographic secure random source exists.
supportsSecureRandom
Used to make sure that a cryptographic secure random source exists.
Does not check for window.crypto.subtle.
supportsSubtleCrypto
supportsZeroByteGCM
Test
npm test