feat(server): xxhash

This commit is contained in:
Jonathan Jogenfors
2024-10-11 01:05:19 +02:00
parent 465f4639da
commit 0dbb0aabc9
15 changed files with 523 additions and 14 deletions

View File

@@ -145,6 +145,7 @@ export interface UpsertFileOptions {
assetId: string;
type: AssetFileType;
path: string;
checksum?: BigInt;
}
export type AssetPathEntity = Pick<AssetEntity, 'id' | 'originalPath' | 'isOffline'>;

View File

@@ -5,6 +5,7 @@ export interface ICryptoRepository {
randomUUID(): string;
hashFile(filePath: string | Buffer): Promise<Buffer>;
hashSha256(data: string): string;
xxHash(value: string): BigInt;
verifySha256(data: string, encrypted: string, publicKey: string): boolean;
hashSha1(data: string | Buffer): Buffer;
hashBcrypt(data: string | Buffer, saltOrRounds: string | number): Promise<string>;