@aws-crypto/sha256-browser

  • Version 2.0.2
  • Published
  • 40.3 kB
  • 8 dependencies
  • Apache-2.0 license

Install

npm i @aws-crypto/sha256-browser
yarn add @aws-crypto/sha256-browser
pnpm add @aws-crypto/sha256-browser

Overview

SHA256 wrapper for browsers that prefers `window.crypto.subtle` but will fall back to a pure JS implementation in @aws-crypto/sha256-js to provide a consistent interface for SHA256.

Index

Classes

class Ie11Sha256

class Sha256 implements Hash {}

    constructor

    constructor(secret?: SourceData);

      method digest

      digest: () => Promise<Uint8Array>;

        method update

        update: (toHash: SourceData) => void;

          class Sha256

          class Sha256 implements Hash {}

            constructor

            constructor(secret?: SourceData);

              method digest

              digest: () => Promise<Uint8Array>;

                method update

                update: (data: SourceData, encoding?: 'utf8' | 'ascii' | 'latin1') => void;

                  class WebCryptoSha256

                  class Sha256 implements Hash {}

                    constructor

                    constructor(secret?: SourceData);

                      method digest

                      digest: () => Promise<Uint8Array>;

                        method update

                        update: (data: SourceData) => void;

                          Package Files (4)

                          Dependencies (8)

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.

                          Badge

                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-crypto/sha256-browser.

                          • Markdown
                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@aws-crypto/sha256-browser)
                          • HTML
                            <a href="https://www.jsdocs.io/package/@aws-crypto/sha256-browser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>