@signalapp/mock-server
Version:
Mock Signal Server for writing tests
28 lines (27 loc) • 718 B
TypeScript
export type StrpKeyMaterial = Uint8Array<ArrayBuffer> & {
StrpKeyMaterial: Uint8Array<ArrayBuffer>;
};
export declare function getStrpKeyMaterial(params: {
sharedSecret: Uint8Array<ArrayBuffer>;
clientHkdfExtraInfo: Uint8Array<ArrayBuffer> | null;
}): StrpKeyMaterial;
type Key = Uint8Array<ArrayBuffer> & {
Key: never;
};
type Salt = Uint8Array<ArrayBuffer> & {
Salt: never;
};
type KeyPair = Readonly<{
key: Key;
salt: Salt;
}>;
type KeyPairs = Readonly<{
rtp: KeyPair;
rtcp: KeyPair;
}>;
type ClientAndServer = Readonly<{
client: KeyPairs;
server: KeyPairs;
}>;
export declare function deriveStrpClientAndServer(keyMaterial: StrpKeyMaterial): ClientAndServer;
export {};