forked from Crypho/react-native-scrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
38 lines (37 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Type definitions for react-native-scrypt 1.2.0
// Project: https://github.com/Crypho/react-native-scrypt
// Definitions by: Yiorgis Gozadinos <https://github.com/ggozad>
// Maddi Joyce <https://github.com/maddijoyce>
// Timothée Rebours <https://github.com/tex0l>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
declare module '@seald-io/react-native-scrypt' {
function scrypt (
password: string,
salt: number[],
cost?: number,
blocksize?: number,
parallel?: number,
length?: number,
encoding?: 'legacy'
): Promise<string>;
function scrypt (
password: Buffer,
salt: Buffer,
cost?: number,
blocksize?: number,
parallel?: number,
length?: number,
encoding?: 'buffer'
): Promise<Buffer>;
function scrypt (
password: string,
salt: string,
cost?: number,
blocksize?: number,
parallel?: number,
length?: number,
encoding?: 'hex' | 'base64'
): Promise<string>;
export default scrypt
}