Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@aws-crypto/supports-web-crypto

aws56mApache-2.05.2.0TypeScript support: included

Provides functions for detecting if the host environment supports the WebCrypto API

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

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.2.0 (2023-10-16)

Features

  • support ESM artifacts in all packages (#752) (e930ffb)

5.1.0 (2023-09-22)

Bug Fixes

5.0.0 (2023-07-13)

Note: Version bump only for package @aws-crypto/supports-web-crypto

4.0.0 (2023-02-20)

Note: Version bump only for package @aws-crypto/supports-web-crypto

3.0.0 (2023-01-12)

Note: Version bump only for package @aws-crypto/supports-web-crypto

2.0.2 (2022-09-07)

Note: Version bump only for package @aws-crypto/supports-web-crypto

2.0.0 (2021-10-25)

Note: Version bump only for package @aws-crypto/supports-web-crypto

1.0.0 (2020-10-22)

Bug Fixes

  • replace sourceRoot -> rootDir in tsconfig (#169) (d437167)

1.0.0-alpha.0 (2020-02-07)

Note: Version bump only for package @aws-crypto/supports-web-crypto

0.1.0-preview.4 (2020-01-16)

Bug Fixes

  • Changed package.json files to point to the right Git repo (#9) (028245d), closes #8
  • lerna version maintains package-lock (#14) (2ef29e1), closes #13

0.1.0-preview.3 (2019-11-15)

Bug Fixes

  • Changed package.json files to point to the right Git repo (#9) (028245d), closes #8
  • lerna version maintains package-lock (#14) (2ef29e1), closes #13

0.1.0-preview.2 (2019-10-30)

Bug Fixes

  • remove /src/ from .npmignore (for sourcemaps) (#5) (ec52056)