mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 20:17:08 +00:00
17 lines
564 B
Go
17 lines
564 B
Go
//go:build !signal_legacy
|
|
|
|
package libsignal
|
|
|
|
/*
|
|
#include <signal_protocol.h>
|
|
#include <session_pre_key.h>
|
|
*/
|
|
import "C"
|
|
|
|
// signedPreKeyOmemoSignature extracts the OMEMO (XEdDSA/Ed25519) signature
|
|
// libomemo-c computes on every signed prekey alongside the legacy one -
|
|
// vanilla libsignal-protocol-c has no such second signature (see
|
|
// signedprekey_legacy.go).
|
|
func signedPreKeyOmemoSignature(spk *C.session_signed_pre_key) []byte {
|
|
return cBytesToGo(C.session_signed_pre_key_get_signature_omemo(spk), C.session_signed_pre_key_get_signature_omemo_len(spk))
|
|
}
|