UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

23 lines (22 loc) 692 B
import { Hasher } from "./hasher.interface"; export declare type HashType = 'sha1' | 'sha256'; export interface HasherOptions { salt: string; iterations: number; keySize: number; type: HashType; } export declare class ShaHasher implements Hasher<string> { protected _options: HasherOptions; constructor(options: HasherOptions); hash(input: string): string; /** * Return the hash as a hexadecimal string * @param hashType * @param input * @param salt * @param iterations * @param keySize */ static hash(hashType: HashType, input: string, salt: string, iterations: number, keySize: number): string; }