mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-30 18:22:37 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			481 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			481 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;
 | |
|   newPassword(bytes: number): string;
 | |
| }
 |