|
1 | 1 | declare module 'react-native-aes-crypto' {
|
2 |
| - namespace Aes { |
3 |
| - type Algorithms = 'aes-128-cbc' | 'aes-192-cbc' | 'aes-256-cbc' |
| 2 | + type Algorithms = 'aes-128-cbc' | 'aes-192-cbc' | 'aes-256-cbc' |
4 | 3 |
|
5 |
| - function pbkdf2(password: string, salt: string, cost: number, length: number): Promise<string> |
6 |
| - function encrypt(text: string, key: string, iv: string, algorithm: Algorithms): Promise<string> |
7 |
| - function decrypt(ciphertext: string, key: string, iv: string, algorithm: Algorithms): Promise<string> |
8 |
| - function hmac256(ciphertext: string, key: string): Promise<string> |
9 |
| - function hmac512(ciphertext: string, key: string): Promise<string> |
10 |
| - function randomKey(length: number): Promise<string> |
11 |
| - function sha1(text: string): Promise<string> |
12 |
| - function sha256(text: string): Promise<string> |
13 |
| - function sha512(text: string): Promise<string> |
14 |
| - } |
| 4 | + function pbkdf2(password: string, salt: string, cost: number, length: number): Promise<string> |
| 5 | + function encrypt(text: string, key: string, iv: string, algorithm: Algorithms): Promise<string> |
| 6 | + function decrypt(ciphertext: string, key: string, iv: string, algorithm: Algorithms): Promise<string> |
| 7 | + function hmac256(ciphertext: string, key: string): Promise<string> |
| 8 | + function hmac512(ciphertext: string, key: string): Promise<string> |
| 9 | + function randomKey(length: number): Promise<string> |
| 10 | + function sha1(text: string): Promise<string> |
| 11 | + function sha256(text: string): Promise<string> |
| 12 | + function sha512(text: string): Promise<string> |
15 | 13 | }
|
0 commit comments