Type alias PolykeyWorkerManifest
PolykeyWorkerManifest: {
checkPassword(__namedParameters, transferList?) => Promise<{
data: boolean;
}>;
decrypt(data, transferList) => Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
} | {
data: undefined;
transferList: [];
}>;
encrypt(data, transferList) => Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>;
generateCertificate(__namedParameters, transferList?) => Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>;
generateDeterministicKeyPair(__namedParameters) => Promise<{
data: {
privateKey: ArrayBuffer;
publicKey: ArrayBuffer;
secretKey: ArrayBuffer;
};
transferList: [ArrayBuffer, ArrayBuffer, ArrayBuffer];
}>;
hashPassword(__namedParameters, transferList?) => Promise<{
data: [ArrayBuffer, ArrayBuffer];
transferList: [ArrayBuffer, ArrayBuffer];
}>;
sleep(__namedParameters) => Promise<{
data: undefined;
}>;
}
Type declaration
-
checkPassword:function
- checkPassword(__namedParameters, transferList?): Promise<{
data: boolean;
}>
-
Parameters
-
__namedParameters: {
hash: ArrayBuffer;
memLimit?: PasswordMemLimit;
opsLimit?: PasswordOpsLimit;
password: string;
salt: ArrayBuffer;
}
-
hash: ArrayBuffer
-
-
-
password: string
-
salt: ArrayBuffer
-
Optional
transferList: ArrayBuffer[]
Returns Promise<{
data: boolean;
}>
-
decrypt:function
- decrypt(data, transferList): Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
} | {
data: undefined;
transferList: [];
}>
-
Parameters
-
data: {
cipherText: ArrayBuffer;
key: ArrayBuffer;
}
-
cipherText: ArrayBuffer
-
key: ArrayBuffer
-
transferList: ArrayBuffer[]
Returns Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
} | {
data: undefined;
transferList: [];
}>
-
encrypt:function
- encrypt(data, transferList): Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>
-
Parameters
-
data: {
key: ArrayBuffer;
plainText: ArrayBuffer;
}
-
key: ArrayBuffer
-
plainText: ArrayBuffer
-
transferList: ArrayBuffer[]
Returns Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>
-
generateCertificate:function
- generateCertificate(__namedParameters, transferList?): Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>
-
Parameters
-
__namedParameters: {
certId: ArrayBuffer;
duration: number;
issuerAttrsExtra?: {
[key: string]: string[];
}[];
issuerPrivateKey: ArrayBuffer;
now?: Date;
subjectAttrsExtra?: {
[key: string]: string[];
}[];
subjectKeyPair: {
privateKey: ArrayBuffer;
publicKey: ArrayBuffer;
};
}
-
certId: ArrayBuffer
-
duration: number
-
Optional
issuerAttrsExtra?: {
[key: string]: string[];
}[]
-
issuerPrivateKey: ArrayBuffer
-
Optional
now?: Date
-
Optional
subjectAttrsExtra?: {
[key: string]: string[];
}[]
-
subjectKeyPair: {
privateKey: ArrayBuffer;
publicKey: ArrayBuffer;
}
-
privateKey: ArrayBuffer
-
publicKey: ArrayBuffer
-
Optional
transferList: ArrayBuffer[]
Returns Promise<{
data: ArrayBuffer;
transferList: [ArrayBuffer];
}>
-
generateDeterministicKeyPair:function
- generateDeterministicKeyPair(__namedParameters): Promise<{
data: {
privateKey: ArrayBuffer;
publicKey: ArrayBuffer;
secretKey: ArrayBuffer;
};
transferList: [ArrayBuffer, ArrayBuffer, ArrayBuffer];
}>
-
Returns Promise<{
data: {
privateKey: ArrayBuffer;
publicKey: ArrayBuffer;
secretKey: ArrayBuffer;
};
transferList: [ArrayBuffer, ArrayBuffer, ArrayBuffer];
}>
-
hashPassword:function
- hashPassword(__namedParameters, transferList?): Promise<{
data: [ArrayBuffer, ArrayBuffer];
transferList: [ArrayBuffer, ArrayBuffer];
}>
-
Parameters
-
__namedParameters: {
memLimit?: PasswordMemLimit;
opsLimit?: PasswordOpsLimit;
password: string;
salt?: ArrayBuffer;
}
-
-
-
password: string
-
Optional
salt?: ArrayBuffer
-
Optional
transferList: ArrayBuffer[]
Returns Promise<{
data: [ArrayBuffer, ArrayBuffer];
transferList: [ArrayBuffer, ArrayBuffer];
}>
-
sleep:function
- sleep(__namedParameters): Promise<{
data: undefined;
}>
-
Parameters
-
__namedParameters: {
delay: number;
}
Returns Promise<{
data: undefined;
}>