immich/server/src/interfaces/crypto.repository.ts
Daniel Dietzler 84f7ca855a
chore(server): move domain interfaces (#8124)
move domain interfaces
2024-03-20 16:42:58 -04:00

11 lines
443 B
TypeScript

export const ICryptoRepository = 'ICryptoRepository';
export interface ICryptoRepository {
randomBytes(size: number): Buffer;
randomUUID(): string;
hashFile(filePath: string | Buffer): Promise<Buffer>;
hashSha256(data: string): string;
hashSha1(data: string | Buffer): Buffer;
hashBcrypt(data: string | Buffer, saltOrRounds: string | number): Promise<string>;
compareBcrypt(data: string | Buffer, encrypted: string): boolean;
}