ScavXpCounts/types/utils/HashUtil.d.ts

24 lines
799 B
TypeScript
Raw Normal View History

2024-02-23 15:06:00 -07:00
import crypto from "node:crypto";
2024-04-19 21:23:52 -06:00
import fs from "node:fs";
2024-11-12 11:51:30 -07:00
import { TimeUtil } from "@spt/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;
2024-04-19 21:23:52 -06:00
generateCRC32ForFile(filePath: fs.PathLike): number;
2023-08-17 19:49:16 -06:00
/**
* 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
}