How to use @aws-crypto/sha256-browser - 10 common examples

To help you get started, we’ve selected a few @aws-crypto/sha256-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-sdk-js-v3 / clients / browser / client-personalize-browser / PersonalizeConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "personalize"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-codepipeline-browser / CodePipelineConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "codepipeline"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-dynamodb-streams-browser / DynamoDBStreamsConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "dynamodb"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-application-discovery-service-browser / ApplicationDiscoveryServiceConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "discovery"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-pinpoint-email-browser / PinpointEmailConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "ses"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-kinesis-video-archived-media-browser / KinesisVideoArchivedMediaConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "kinesisvideo"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-cloudsearch-domain-browser / CloudSearchDomainConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "cloudsearch"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-comprehend-browser / ComprehendConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "comprehend"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-app-mesh-browser / AppMeshConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "appmesh"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,
github aws / aws-sdk-js-v3 / clients / browser / client-appstream-browser / AppStreamConfiguration.ts View on Github external
| __aws_sdk_types.Credentials
        | __aws_sdk_types.Provider<__aws_sdk_types.Credentials>
        | undefined
    ) => {
      if (typeof value === "object") {
        const promisified = Promise.resolve(value);
        return () => promisified;
      } else if (value === undefined) {
        throw new Error("credentials cannot be undefined");
      }

      return value;
    }
  },
  sha256: {
    defaultValue: __aws_crypto_sha256_browser.Sha256
  },
  signingName: {
    defaultValue: "appstream"
  },
  signer: {
    defaultProvider: (configuration: {
      credentials: __aws_sdk_types.Provider<__aws_sdk_types.Credentials>;
      region: __aws_sdk_types.Provider;
      sha256: __aws_sdk_types.HashConstructor;
      signingName: string;
    }) =>
      new __aws_sdk_signature_v4.SignatureV4({
        credentials: configuration.credentials,
        region: configuration.region,
        service: configuration.signingName,
        sha256: configuration.sha256,

@aws-crypto/sha256-browser

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.

Apache-2.0
Latest version published 1 year ago

Package Health Score

88 / 100
Full package analysis

Popular @aws-crypto/sha256-browser functions

Similar packages