ScavXpCounts/types/utils/HashUtil.d.ts

23 lines
751 B
TypeScript
Raw Normal View History

2023-08-17 19:49:16 -06:00
/// <reference types="node" />
2024-02-23 15:06:00 -07:00
import crypto from "node:crypto";
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
2023-08-17 19:49:16 -06:00
export declare class HashUtil {
protected timeUtil: TimeUtil;
constructor(timeUtil: TimeUtil);
/**
* Create a 24 character id using the sha256 algorithm + current timestamp
* @returns 24 character hash
*/
generate(): string;
generateMd5ForData(data: string): string;
generateSha1ForData(data: string): string;
/**
* Create a hash for the data parameter
* @param algorithm algorithm to use to hash
* @param data data to be hashed
* @returns hash value
*/
generateHashForData(algorithm: string, data: crypto.BinaryLike): string;
2024-02-23 15:06:00 -07:00
generateAccountId(): number;
2023-08-17 19:49:16 -06:00
}