Skip to content

Commit 90b1b89

Browse files
committed
Update to RN 0.66.4, add react-native-aes-crypto.
1 parent a454359 commit 90b1b89

File tree

7 files changed

+399
-339
lines changed

7 files changed

+399
-339
lines changed

index.d.ts

+27
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,30 @@ declare module 'react-native-crypto' {
66
import * as crypto from 'crypto'
77
export = crypto
88
}
9+
declare module 'react-native-aes-crypto' {
10+
export type Algorithms = 'aes-128-cbc' | 'aes-192-cbc' | 'aes-256-cbc'
11+
export function pbkdf2(
12+
password: string,
13+
salt: string,
14+
cost: number,
15+
length: number
16+
): Promise<string>
17+
export function encrypt(
18+
text: string,
19+
key: string,
20+
iv: string,
21+
algorithm: Algorithms
22+
): Promise<string>
23+
export function decrypt(
24+
ciphertext: string,
25+
key: string,
26+
iv: string,
27+
algorithm: Algorithms
28+
): Promise<string>
29+
export function hmac256(ciphertext: string, key: string): Promise<string>
30+
export function hmac512(ciphertext: string, key: string): Promise<string>
31+
export function randomKey(length: number): Promise<string>
32+
export function sha1(text: string): Promise<string>
33+
export function sha256(text: string): Promise<string>
34+
export function sha512(text: string): Promise<string>
35+
}

ios/EnderChat.xcodeproj/project.pbxproj

+65-65
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)