mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
GroupsV2: Better group invite behavior
This commit is contained in:
committed by
Josh Perez
parent
b9ff4f07d3
commit
d51a0b5ece
@@ -9,6 +9,7 @@ import {
|
||||
GroupSecretParams,
|
||||
ProfileKey,
|
||||
ProfileKeyCiphertext,
|
||||
ProfileKeyCredential,
|
||||
ProfileKeyCredentialPresentation,
|
||||
ProfileKeyCredentialRequestContext,
|
||||
ProfileKeyCredentialResponse,
|
||||
@@ -220,6 +221,29 @@ export function getAuthCredentialPresentation(
|
||||
return compatArrayToArrayBuffer(presentation.serialize());
|
||||
}
|
||||
|
||||
export function createProfileKeyCredentialPresentation(
|
||||
clientZkProfileCipher: ClientZkProfileOperations,
|
||||
profileKeyCredentialBase64: string,
|
||||
groupSecretParamsBase64: string
|
||||
): ArrayBuffer {
|
||||
const profileKeyCredentialArray = base64ToCompatArray(
|
||||
profileKeyCredentialBase64
|
||||
);
|
||||
const profileKeyCredential = new ProfileKeyCredential(
|
||||
profileKeyCredentialArray
|
||||
);
|
||||
const secretParams = new GroupSecretParams(
|
||||
base64ToCompatArray(groupSecretParamsBase64)
|
||||
);
|
||||
|
||||
const presentation = clientZkProfileCipher.createProfileKeyCredentialPresentation(
|
||||
secretParams,
|
||||
profileKeyCredential
|
||||
);
|
||||
|
||||
return compatArrayToArrayBuffer(presentation.serialize());
|
||||
}
|
||||
|
||||
export function getClientZkAuthOperations(
|
||||
serverPublicParamsBase64: string
|
||||
): ClientZkAuthOperations {
|
||||
|
||||
Reference in New Issue
Block a user