
org.signal.libsignal.cds2.Cds2Metrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libsignal-server Show documentation
Show all versions of libsignal-server Show documentation
Signal Protocol cryptography library for Java (server-side)
//
// Copyright 2022 Signal Messenger, LLC.
// SPDX-License-Identifier: AGPL-3.0-only
//
package org.signal.libsignal.cds2;
import static org.signal.libsignal.internal.FilterExceptions.filterExceptions;
import java.util.Map;
import org.signal.libsignal.attest.AttestationDataException;
import org.signal.libsignal.internal.Native;
public final class Cds2Metrics {
private Cds2Metrics() {}
/**
* Parse a cds2 attestation response (ClientHandshakeStart) and return supplemental information
* extracted from the response's evidence and endorsements.
*
* @param attestationMessage A ClientHandshakeStart message
* @throws AttestationDataException if the attestationMessage cannot be parsed
*/
public static Map extract(final byte[] attestationMessage)
throws AttestationDataException {
@SuppressWarnings("unchecked")
Map result =
filterExceptions(
AttestationDataException.class, () -> Native.Cds2Metrics_extract(attestationMessage));
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy