How to use @aws-sdk/hash-node - 5 common examples

To help you get started, we’ve selected a few @aws-sdk/hash-node 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 / client-transcribe-streaming / runtimeConfig.ts View on Github external
import { JsonProtocol } from "@aws-sdk/protocol-json";
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
import { EventStreamMarshaller } from "@aws-sdk/util-eventstream-node";
import { name, version } from "./package.json";
import { TranscribeStreamingRuntimeDependencies } from "./TranscribeStreamingClient";

export const TranscribeStreamingRuntimeConfiguration: Required<
  TranscribeStreamingRuntimeDependencies
> = {
  protocolDefaultProvider: handler => new JsonProtocol(handler),
  signingName: "transcribestreaming",
  service: "transcribestreaming",
  httpHandler: new NodeHttp2Handler(),
  sha256: Hash.bind(null, "sha256"),
  credentialDefaultProvider,
  regionDefaultProvider,
  urlParser: parseUrl,
  bodyLengthChecker: calculateBodyLength,
  streamCollector,
  base64Decoder: fromBase64,
  base64Encoder: toBase64,
  utf8Decoder: fromUtf8,
  utf8Encoder: toUtf8,
  defaultUserAgent: defaultUserAgent(name, version)
  // eventStreamSerde: new EventStreamMarshaller(toUtf8, fromUtf8)
};
github aws / aws-sdk-js-v3 / packages / signature-v4-node / src / index.ts View on Github external
constructor({
    sha256 = Hash.bind(null, "sha256"),
    ...rest
  }: SignatureV4Init) {
    super({ sha256, ...rest });
  }
}
github aws / aws-sdk-js-v3 / clients / client-rds-data / runtimeConfig.ts View on Github external
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
import { name, version } from "./package.json";
import { ClientDefaults } from "./RDSDataClient";
import { ClientSharedValues } from "./runtimeConfig.shared";

export const ClientDefaultValues: Required = {
  ...ClientSharedValues,
  requestHandler: new NodeHttpHandler(),
  sha256: Hash.bind(null, "sha256"),
  urlParser: parseUrl,
  bodyLengthChecker: calculateBodyLength,
  streamCollector,
  base64Decoder: fromBase64,
  base64Encoder: toBase64,
  utf8Decoder: fromUtf8,
  utf8Encoder: toUtf8,
  defaultUserAgent: defaultUserAgent(name, version),
  signingName: "rds-data",
  credentialDefaultProvider,
  regionDefaultProvider,
};
github aws / aws-sdk-js-v3 / packages / md5-universal / src / index.ts View on Github external
constructor() {
    if (supportsCryptoModule()) {
      this.hash = new NodeHash("md5");
    } else {
      this.hash = new BrowserMd5();
    }
  }
github aws / aws-sdk-js-v3 / packages / crypto-sha256-universal / src / index.ts View on Github external
constructor(secret?: SourceData) {
        if (supportsCryptoModule()) {
            this.hash = new NodeHash('sha256', secret);
        } else {
            this.hash = new BrowserSha256(secret);
        }
    }

@aws-sdk/hash-node

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/hash-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/hash-node) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/hash-node.svg)](https://www.npmjs.com/package/@aws-sdk/hash-node)

Apache-2.0
Latest version published 1 year ago

Package Health Score

72 / 100
Full package analysis

Popular @aws-sdk/hash-node functions

Similar packages