-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
84 lines (82 loc) · 5.6 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export function argon2Hash(password: string): string
export function argon2HashThreadPool(password: string): string
export function argon2Verify(hashedPassword: string, passwordToVerify: string): boolean
export function argon2VerifyThreadpool(hashedPassword: string, passwordToVerify: string): boolean
export function bcryptHash(passwordToHash: string): string
export function bcryptHashThreadpool(passwordToHash: string): string
export function bcryptVerify(hashedPassword: string, passwordToVerify: string): boolean
export function bcryptVerifyThreadpool(passwordToHash: string, passwordToVerify: string): boolean
export function scryptHash(passwordToHash: string): string
export function scryptVerify(hashedPassword: string, passwordToVerify: string): boolean
export function scryptHashThreadpool(passwordToHash: string): string
export function scryptVerifyThreadpool(hashedPassword: string, passwordToVerify: string): boolean
export function sha512(dataToHash: Array<number>): Array<number>
export function sha512Verify(dataToHash: Array<number>, dataToVerify: Array<number>): boolean
export function sha256(dataToHash: Array<number>): Array<number>
export function sha256Verify(dataToHash: Array<number>, dataToVerify: Array<number>): boolean
export function x25519GenerateSecretAndPublicKey(): CASx25519SecretPublicKeyResult
export function x25519DiffieHellman(mySecretKey: Array<number>, usersPublicKey: Array<number>): Array<number>
export function aesNonce(): Array<number>
export function aes128Key(): Array<number>
export function aes256Key(): Array<number>
export function aes128Encrypt(aesKey: Array<number>, nonce: Array<number>, plaintext: Array<number>): Array<number>
export function aes128Decrypt(aesKey: Array<number>, nonce: Array<number>, ciphertext: Array<number>): Array<number>
export function aes256Encrypt(aesKey: Array<number>, nonce: Array<number>, plaintext: Array<number>): Array<number>
export function aes256Decrypt(aesKey: Array<number>, nonce: Array<number>, ciphertext: Array<number>): Array<number>
export function aes256KeyFromX25519SharedSecret(sharedSecret: Array<number>): CASAesKeyFromX25519SharedSecret
export function aes128KeyFromX25519SharedSecret(sharedSecret: Array<number>): CASAesKeyFromX25519SharedSecret
export function generateRsaKeys(keySize: number): CasrsaKeyPairResult
export function encryptPlaintextRsa(publicKey: string, plaintext: Array<number>): Array<number>
export function decryptCiphertextRsa(privateKey: string, ciphertext: Array<number>): Array<number>
export function signRsa(privateKey: string, hash: Array<number>): Array<number>
export function verifyRsa(publicKey: string, hash: Array<number>, signature: Array<number>): boolean
export function sha512RsaDigitalSignature(rsaKeySize: number, dataToSign: Array<number>): CASRSADigitalSignatureResult
export function sha512RsaVerifyDigitalSignature(publicKey: string, dataToVerify: Array<number>, signature: Array<number>): boolean
export function sha256RsaDigitalSignature(rsaKeySize: number, dataToSign: Array<number>): CASRSADigitalSignatureResult
export function sha256RsaVerifyDigitalSignature(publicKey: string, dataToVerify: Array<number>, signature: Array<number>): boolean
export function sha512Ed25519DigitalSignature(dataToSign: Array<number>): CASSHAED25519DalekDigitalSignatureResult
export function sha512Ed25519DigitalSignatureVerify(publicKey: Array<number>, dataToVerify: Array<number>, signature: Array<number>): boolean
export function sha256Ed25519DigitalSignature(dataToSign: Array<number>): CASSHAED25519DalekDigitalSignatureResult
export function sha256Ed25519DigitalSignatureVerify(publicKey: Array<number>, dataToVerify: Array<number>, signature: Array<number>): boolean
export function ascon128KeyGenerate(): Array<number>
export function ascon128NonceGenerate(): Array<number>
export function ascon128Encrypt(key: Array<number>, nonce: Array<number>, plaintext: Array<number>): Array<number>
export function ascon128Decrypt(key: Array<number>, nonce: Array<number>, ciphertext: Array<number>): Array<number>
export function hmacSign(key: Array<number>, message: Array<number>): Array<number>
export function hmacSignThreadpool(key: Array<number>, message: Array<number>): Array<number>
export function hmacVerify(key: Array<number>, message: Array<number>, signature: Array<number>): boolean
export function hmacVerifyThreadpool(key: Array<number>, message: Array<number>, signature: Array<number>): boolean
export type CASx25519SecretPublicKeyResult = CaSx25519SecretPublicKeyResult
export class CaSx25519SecretPublicKeyResult {
publicKey: Array<number>
secretKey: Array<number>
constructor(publicKey: Array<number>, secretKey: Array<number>)
}
export type CASAesKeyFromX25519SharedSecret = CasAesKeyFromX25519SharedSecret
export class CasAesKeyFromX25519SharedSecret {
aesKey: Array<number>
aesNonce: Array<number>
constructor(aesKey: Array<number>, aesNonce: Array<number>)
}
export type CASRSAKeyPairResult = CasrsaKeyPairResult
export class CasrsaKeyPairResult {
privateKey: string
publicKey: string
constructor(privateKey: string, publicKey: string)
}
export type CASSHAED25519DalekDigitalSignatureResult = Casshaed25519DalekDigitalSignatureResult
export class Casshaed25519DalekDigitalSignatureResult {
publicKey: Array<number>
signature: Array<number>
constructor(publicKey: Array<number>, signature: Array<number>)
}
export type CASRSADigitalSignatureResult = CasrsaDigitalSignatureResult
export class CasrsaDigitalSignatureResult {
publicKey: string
privateKey: string
signature: Array<number>
constructor(publicKey: string, privateKey: string, signature: Array<number>)
}