ts-md5
- Version 1.3.1
- Published
- 165 kB
- No dependencies
- MIT license
Install
npm i ts-md5
yarn add ts-md5
pnpm add ts-md5
Overview
TypeScript MD5 implementation
Index
Classes
class Md5
class Md5 {}
constructor
constructor();
method appendAsciiStr
appendAsciiStr: (str: string) => this;
Append an ASCII string to the hash buffer
Parameter str
String to append
method appendByteArray
appendByteArray: (input: Uint8Array) => this;
Append a byte array to the hash buffer
Parameter input
array to append
method appendStr
appendStr: (str: string) => this;
Append a UTF-8 string to the hash buffer
Parameter str
String to append
method end
end: (raw?: boolean) => string | Int32Array | undefined;
Hash the current state of the hash buffer and return the result
Parameter raw
Whether to return the value as an
Int32Array
method getState
getState: () => HasherState;
Get the state of the hash buffer
method hashAsciiStr
static hashAsciiStr: { (str: string, raw?: false): string; (str: string, raw: true): Int32Array;};
Hash a ASCII string on the spot
Parameter str
String to hash
Parameter raw
Whether to return the value as an
Int32Array
method hashStr
static hashStr: { (str: string, raw?: false): string; (str: string, raw: true): Int32Array;};
Hash a UTF-8 string on the spot
Parameter str
String to hash
Parameter raw
Whether to return the value as an
Int32Array
method setState
setState: (state: HasherState) => void;
Override the current state of the hash buffer
Parameter state
New hash buffer state
method start
start: () => this;
Initialise buffer to be hashed
class Md5FileHasher
class Md5FileHasher {}
constructor
constructor( _callback: (r: HashingResponse) => void, _async?: boolean, _partSize?: number);
method hash
hash: (blob: any) => void;
Hash a blob of data in the worker
Parameter blob
Data to hash
class ParallelHasher
class ParallelHasher {}
constructor
constructor(workerUri: string, workerOptions?: WorkerOptions);
method hash
hash: (blob: any) => Promise<unknown>;
Hash a blob of data in the worker
Parameter blob
Data to hash
Returns
Promise of the Hashed result
method terminate
terminate: () => void;
Terminate any existing hash requests
Interfaces
interface HashingResponse
interface HashingResponse {}
Package Files (4)
Dependencies (0)
No dependencies.
Dev Dependencies (9)
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/ts-md5
.
- Markdown[](https://www.jsdocs.io/package/ts-md5)
- HTML<a href="https://www.jsdocs.io/package/ts-md5"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4327 ms. - Missing or incorrect documentation? Open an issue for this package.