mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +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
13 lines
558 B
TypeScript
13 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;
|
|
}
|