@abdellatif.dev/cryptjs
Version:
A JavaScript/TypeScript library that brings cryptographic functionality from Dart to the web
33 lines (32 loc) • 1.15 kB
TypeScript
/**
* Mapping of SHA types to their corresponding numeric identifiers.
* Used for specifying the SHA algorithm in certain contexts, such as cryptographic operations.
* @type {{ sha256: import("./types").ShaType; sha512: import("./types").ShaType; }}
*/
export const shaType: {
sha256: import("./types").ShaType;
sha512: import("./types").ShaType;
};
/**
* @description Class representing a SHA object with its type, hash, salt, and salted hash.
*/
export default class Sha {
/**
* @description Creates an instance of the Sha class.
* @param {import("./types").ShaType} algorithm type of algorithm
* @param {string} salt The hash value.
* @param {string} hash The salt value.
*/
constructor(algorithm: import("./types").ShaType, salt: string, hash: string);
/** @type {import("./types").ShaType} */
type: import("./types").ShaType;
/** @type {string} */
hash: string;
/** @type {string} */
salt: string;
/**
* Method to get the salted hash.
* @returns {import("./types").SaltedHash} The salted hash value.
*/
toString(): import("./types").SaltedHash;
}