2023-01-18 09:40:15 -05:00
|
|
|
export const ICryptoRepository = 'ICryptoRepository';
|
|
|
|
|
|
|
|
|
|
export interface ICryptoRepository {
|
|
|
|
|
randomBytes(size: number): Buffer;
|
2023-07-09 00:37:40 -04:00
|
|
|
randomUUID(): string;
|
2023-09-12 23:46:37 -04:00
|
|
|
hashFile(filePath: string | Buffer): Promise<Buffer>;
|
2023-01-27 20:50:07 +00:00
|
|
|
hashSha256(data: string): string;
|
2023-09-12 23:46:37 -04:00
|
|
|
hashSha1(data: string | Buffer): Buffer;
|
2023-01-27 20:50:07 +00:00
|
|
|
hashBcrypt(data: string | Buffer, saltOrRounds: string | number): Promise<string>;
|
|
|
|
|
compareBcrypt(data: string | Buffer, encrypted: string): boolean;
|
2023-01-18 09:40:15 -05:00
|
|
|
}
|