all the (un)pickles take a Uint8Array

This commit is contained in:
Hubert Chathi 2020-10-06 17:28:52 -04:00
parent 4d17aa4f05
commit 60d451bbbe

12
javascript/index.d.ts vendored
View file

@ -29,8 +29,8 @@ declare class Account {
remove_one_time_keys(session: Session); remove_one_time_keys(session: Session);
generate_fallback_key(); generate_fallback_key();
fallback_key(): string; fallback_key(): string;
pickle(key: string): string; pickle(key: string | Uint8Array): string;
unpickle(key: string, pickle: string); unpickle(key: string | Uint8Array, pickle: string);
} }
declare class Session { declare class Session {
@ -64,8 +64,8 @@ declare class Utility {
declare class InboundGroupSession { declare class InboundGroupSession {
constructor(); constructor();
free(): void; free(): void;
pickle(key: string): string; pickle(key: string | Uint8Array): string;
unpickle(key: string, pickle: string); unpickle(key: string | Uint8Array, pickle: string);
create(session_key: string): string; create(session_key: string): string;
import_session(session_key: string): string; import_session(session_key: string): string;
decrypt(message: string): object; decrypt(message: string): object;
@ -77,8 +77,8 @@ declare class InboundGroupSession {
declare class OutboundGroupSession { declare class OutboundGroupSession {
constructor(); constructor();
free(): void; free(): void;
pickle(key: string): string; pickle(key: string | Uint8Array): string;
unpickle(key: string, pickle: string); unpickle(key: string | Uint8Array, pickle: string);
create(): void; create(): void;
encrypt(plaintext: string): string; encrypt(plaintext: string): string;
session_id(): string; session_id(): string;