2018-04-15 05:20:37 +02:00
|
|
|
export abstract class CryptoFunctionService {
|
2018-04-16 18:07:51 +02:00
|
|
|
pbkdf2: (password: string | ArrayBuffer, salt: string | ArrayBuffer, algorithm: 'sha256' | 'sha512',
|
2018-04-18 03:18:47 +02:00
|
|
|
iterations: number) => Promise<ArrayBuffer>;
|
2018-04-17 21:59:38 +02:00
|
|
|
hash: (value: string | ArrayBuffer, algorithm: 'sha1' | 'sha256' | 'sha512') => Promise<ArrayBuffer>;
|
2018-04-18 01:02:58 +02:00
|
|
|
hmac: (value: ArrayBuffer, key: ArrayBuffer, algorithm: 'sha1' | 'sha256' | 'sha512') => Promise<ArrayBuffer>;
|
2018-04-22 05:14:04 +02:00
|
|
|
aesEncrypt: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
|
|
aesDecryptSmall: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
|
|
aesDecryptLarge: (data: ArrayBuffer, iv: ArrayBuffer, key: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
|
|
rsaEncrypt: (data: ArrayBuffer, publicKey: ArrayBuffer, algorithm: 'sha1' | 'sha256') => Promise<ArrayBuffer>;
|
2018-04-19 06:00:53 +02:00
|
|
|
rsaDecrypt: (data: ArrayBuffer, key: ArrayBuffer, algorithm: 'sha1' | 'sha256') => Promise<ArrayBuffer>;
|
2018-04-22 05:14:04 +02:00
|
|
|
randomBytes: (length: number) => Promise<ArrayBuffer>;
|
2018-04-15 05:20:37 +02:00
|
|
|
}
|