mirror of
https://github.com/LukeHagar/immich.git
synced 2025-12-10 04:20:16 +00:00
* feat: user license endpoints * feat: server license endpoints * chore: pr feedback * chore: add more test cases * chore: add prod license public keys * chore: open-api generation
14 lines
558 B
TypeScript
14 lines
558 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;
|
|
verifySha256(data: string, encrypted: string, publicKey: string): boolean;
|
|
hashSha1(data: string | Buffer): Buffer;
|
|
hashBcrypt(data: string | Buffer, saltOrRounds: string | number): Promise<string>;
|
|
compareBcrypt(data: string | Buffer, encrypted: string): boolean;
|
|
newPassword(bytes: number): string;
|
|
}
|