Add binaries class

This commit is contained in:
Lucas
2018-11-10 20:25:10 +01:00
parent bfbd5e6524
commit 4e753b47a4
+17
View File
@@ -23,6 +23,11 @@ export interface ObjectMap {
deleted: KdbxObject[];
}
export interface BinaryInforamtion {
ref: string;
value: ProtectedValue | ArrayBuffer;
}
export interface editingState {
added: [Date];
deleted: [Date];
@@ -61,6 +66,7 @@ export class Int64 {
export class Kdbx {
constructor();
binaries: Binaries;
deletedObjects: KdbxObject[];
addDeletedObject(uuid: KdbxUuid, dt: Date): void;
@@ -415,6 +421,17 @@ export class BinaryStream {
writeBytes(bytes: ArrayBuffer | Uint8Array): void;
}
export class Binaries {
constructor();
hash(): Promise<any[]>;
getBinaryHash(
binary: ProtectedValue | ArrayBuffer | Uint8Array
): Promise<string>;
assignIds(): void;
add(value: ProtectedValue | ArrayBuffer): Promise<BinaryInforamtion>;
}
export class Context {
constructor(opts: Kdbx);