Files
immich/server/libs/domain/src/crypto/crypto.repository.ts
T
Jason Rasmussen d2a9363fc5 refactor(server): auth guard (#1472)
* refactor: auth guard

* chore: move auth guard to middleware

* chore: tests

* chore: remove unused code

* fix: migration to uuid without dataloss

* chore: e2e tests

* chore: removed unused guards
2023-01-31 12:11:49 -06:00

9 lines
320 B
TypeScript

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