@types/ssri
- Version 7.1.5
- Published
- 8.26 kB
- 1 dependency
- MIT license
Install
npm i @types/ssri
yarn add @types/ssri
pnpm add @types/ssri
Overview
TypeScript definitions for ssri
Index
Functions
Classes
Interfaces
Type Aliases
Functions
function checkData
checkData: ( data: string | Buffer | NodeJS.TypedArray, sri: string | IntegrityLike | HashLike, opts?: { strict?: boolean | undefined; error?: boolean | undefined; size?: number | undefined; pickAlgorithm?: (algo1: string, algo2: string) => string; }) => Hash | false;
function checkStream
checkStream: { ( stream: Readable, sri: string | IntegrityLike | HashLike, opts?: { strict?: boolean | undefined; options?: readonly string[] | undefined; size?: number | undefined; pickAlgorithm?: (algo1: string, algo2: string) => string; } ): Promise<Hash>; ( stream: Readable, sri: string | IntegrityLike | HashLike, opts?: { strict?: boolean; options?: readonly string[]; size?: number; pickAlgorithm?: (algo1: string, algo2: string) => string; Promise?: PromiseConstructorLike; } ): PromiseLike<Hash>;};
function create
create: (opts?: { strict?: boolean | undefined; options?: readonly string[] | undefined; algorithms?: readonly string[] | undefined;}) => CryptoHash;
function fromData
fromData: ( data: string | Buffer | NodeJS.TypedArray | DataView, opts?: { strict?: boolean | undefined; options?: readonly string[] | undefined; algorithms?: readonly string[] | undefined; }) => IntegrityMap;
function fromHex
fromHex: { ( hexDigest: string, algorithm: string, opts?: { single?: false | undefined; strict?: boolean | undefined; options?: readonly string[] | undefined; } ): IntegrityMap; ( hexDigest: string, algorithm: string, opts?: { single: true; strict?: boolean; options?: readonly string[] } ): Hash; ( hexDigest: string, algorithm: string, opts?: { single?: boolean; strict?: boolean; options?: readonly string[] } ): IntegrityMap | Hash;};
function fromStream
fromStream: { ( stream: Readable, opts?: { strict?: boolean | undefined; options?: readonly string[] | undefined; algorithms?: readonly string[] | undefined; } ): Promise<IntegrityMap>; ( stream: Readable, opts?: { strict?: boolean; options?: readonly string[]; algorithms?: readonly string[]; Promise?: PromiseConstructorLike; } ): PromiseLike<IntegrityMap>;};
function integrityStream
integrityStream: (opts?: { single?: boolean | undefined; strict?: boolean | undefined; options?: readonly string[] | undefined; algorithms?: readonly string[] | undefined; integrity?: string | IntegrityLike | HashLike | undefined; size?: number | undefined; pickAlgorithm?: (algo1: string, algo2: string) => string;}) => Transform;
function parse
parse: { ( sri: string | IntegrityLike | HashLike, opts?: { single?: false | undefined; strict?: boolean | undefined } ): IntegrityMap; ( sri: string | IntegrityLike | HashLike, opts?: { single: true; strict?: boolean } ): Hash; ( sri: string | IntegrityLike | HashLike, opts?: { single?: boolean; strict?: boolean } ): IntegrityMap | Hash;};
function stringify
stringify: ( obj: string | IntegrityLike | HashLike, opts?: { strict?: boolean | undefined; sep?: string | undefined }) => string;
Classes
class Hash
class Hash implements HashLike {}
constructor
constructor(hash: string, opts?: { strict?: boolean | undefined });
property algorithm
algorithm: string;
property digest
digest: string;
property isHash
isHash: boolean;
property options
options?: string[];
property source
source: string;
method hexDigest
hexDigest: () => string;
method toJSON
toJSON: () => string;
method toString
toString: (opts?: { strict?: boolean | undefined }) => string;
class Integrity
class Integrity {}
property isIntegrity
isIntegrity: boolean;
method concat
concat: ( integrity: string | IntegrityLike | HashLike, opts?: { strict?: boolean | undefined }) => IntegrityMap;
method hexDigest
hexDigest: () => string;
method match
match: ( integrity: string | IntegrityLike | HashLike, opts?: { strict?: boolean | undefined; pickAlgorithm?: (algo1: string, algo2: string) => string; }) => Hash | false;
method merge
merge: ( otherIntegrity?: string | IntegrityLike | HashLike, opts?: { single?: boolean | undefined; strict?: boolean | undefined }) => void;
Safely merges another IntegrityLike or integrity string into an Integrity object.
method pickAlgorithm
pickAlgorithm: (opts?: { pickAlgorithm?: (algo1: string, algo2: string) => string;}) => string;
method toJSON
toJSON: () => string;
method toString
toString: (opts?: { strict?: boolean | undefined; sep?: string | undefined;}) => string;
Interfaces
interface HashLike
interface HashLike {}
interface IntegrityLike
interface IntegrityLike {}
index signature
[algorithm: string]: HashLike[];
Type Aliases
type IntegrityMap
type IntegrityMap = Integrity & IntegrityLike;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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/@types/ssri
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/ssri)
- HTML<a href="https://www.jsdocs.io/package/@types/ssri"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3896 ms. - Missing or incorrect documentation? Open an issue for this package.