@hazae41/kdbx
Version:
Rust-like KeePass (KDBX 4) file format for TypeScript
52 lines (51 loc) • 2.59 kB
TypeScript
import type { Cursor } from "@hazae41/cursor";
export type Cipher = typeof Cipher.Aes128Cbc | typeof Cipher.Aes256Cbc | typeof Cipher.TwoFishCbc | typeof Cipher.ChaCha20;
export declare namespace Cipher {
namespace Aes128Cbc {
const uuid = "61ab05a1-9464-41c3-8d74-3a563df8dd35";
function cloneOrThrow(): typeof Aes128Cbc;
function sizeOrThrow(): number;
function writeOrThrow(cursor: Cursor<ArrayBuffer>): void;
namespace IV {
const length = 16;
}
function encryptOrThrow(key: Uint8Array<ArrayBuffer>, iv: Uint8Array<ArrayBuffer>, data: Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer>>;
function decryptOrThrow(key: Uint8Array<ArrayBuffer>, iv: Uint8Array<ArrayBuffer>, data: Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer>>;
}
namespace Aes256Cbc {
const uuid = "31c1f2e6-bf71-4350-be58-05216afc5aff";
function cloneOrThrow(): typeof Aes256Cbc;
function sizeOrThrow(): number;
function writeOrThrow(cursor: Cursor<ArrayBuffer>): void;
namespace IV {
const length = 16;
}
function encryptOrThrow(key: Uint8Array<ArrayBuffer>, iv: Uint8Array<ArrayBuffer>, data: Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer>>;
function decryptOrThrow(key: Uint8Array<ArrayBuffer>, iv: Uint8Array<ArrayBuffer>, data: Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer>>;
}
namespace TwoFishCbc {
const uuid = "ad68f29f-576f-4bb9-a36a-d47af965346c";
function cloneOrThrow(): typeof TwoFishCbc;
function sizeOrThrow(): number;
function writeOrThrow(cursor: Cursor<ArrayBuffer>): void;
namespace IV {
const length = 16;
}
function encryptOrThrow(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<never>;
function decryptOrThrow(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<never>;
}
namespace ChaCha20 {
const uuid = "d6038a2b-8b6f-4cb5-a524-339a31dbb59a";
function cloneOrThrow(): typeof ChaCha20;
function sizeOrThrow(): number;
function writeOrThrow(cursor: Cursor<ArrayBuffer>): void;
namespace IV {
const length = 12;
}
function encryptOrThrow(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<never>;
function decryptOrThrow(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<never>;
}
}
export declare namespace Cipher {
function readOrThrow(cursor: Cursor<ArrayBuffer>): Cipher;
}