@istvan.xyz/phc-format
Version:
An implementation of the PHC format.
22 lines • 792 B
TypeScript
/// <reference types="node" />
/**
* Generates a PHC string using the data provided.
* @param {Object} opts Object that holds the data needed to generate the PHC
* string.
* @param {string} opts.id Symbolic name for the function.
* @param {Number} [opts.version] The version of the function.
* @param {Object} [opts.params] Parameters of the function.
* @param {Buffer} [opts.salt] The salt as a binary buffer.
* @param {Buffer} [opts.hash] The hash as a binary buffer.
* @return {string} The hash string adhering to the PHC format.
*/
export default function serialize(opts: {
id: string;
version?: number;
params?: {
[key: string]: string | Buffer | number;
};
salt?: Buffer;
hash?: Buffer;
}): string;
//# sourceMappingURL=serialize.d.ts.map