Documentation ¶
Overview ¶
Based on https://gist.github.com/nanu-c/f885b928b9e43a7167258dd70dc186d6 from nanu-c which is based on https://github.com/signalapp/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/fingerprint/NumericFingerprintGenerator.java
Index ¶
- Constants
- func CreateFingerprint(version uint32, localStableIdentifier []byte, ...) ([]string, []byte, error)
- func CreateFingerprintNumbers(localFingerprint []byte, remoteFingerprint []byte) []string
- func CreateFingerprintSimple(version uint32, local string, localKey []byte, remote string, remoteKey []byte) ([]string, []byte, error)
- func CreateQRFingerprint(version uint32, localFingerprint []byte, remoteFingerprint []byte) ([]byte, error)
- func ScanQRFingerprint(qrCodeContent []byte) (*textsecure.CombinedFingerprints, error)
- func SortByteArrays(src []axolotl.ECPublicKey) []axolotl.ECPublicKey
Constants ¶
const FINGERPRINT_VERSION int16 = 0
const ITERATIONS int = 5200
Variables ¶
This section is empty.
Functions ¶
func CreateFingerprint ¶
func CreateFingerprint(version uint32, localStableIdentifier []byte, localIdentityKeys []axolotl.ECPublicKey, remoteStableIdentifier []byte, remoteIdentityKeys []axolotl.ECPublicKey) ([]string, []byte, error)
https://github.com/signalapp/libsignal-protocol-java/blob/fde96d22004f32a391554e4991e4e1f0a14c2d50/java/src/main/java/org/whispersystems/libsignal/fingerprint/NumericFingerprintGenerator.java#L85 returns: the fingerprint in blocks of five digits
func CreateFingerprintSimple ¶
func CreateFingerprintSimple(version uint32, local string, localKey []byte, remote string, remoteKey []byte) ([]string, []byte, error)
I'm not particular happy with the name "CreateFingerprintSimple"
func CreateQRFingerprint ¶
func CreateQRFingerprint(version uint32, localFingerprint []byte, remoteFingerprint []byte) ([]byte, error)
based on https://github.com/signalapp/libsignal-protocol-java/blob/3662b6d705ae4162ad8b3a242daf35171edbb068/java/src/main/java/org/whispersystems/libsignal/fingerprint/ScannableFingerprint.java and https://github.com/signalapp/Signal-Android/blob/6f39f9849a002f6361d192a00fbd7c52ffaf3bba/app/src/main/java/org/thoughtcrime/securesms/VerifyIdentityActivity.java#
func ScanQRFingerprint ¶
func ScanQRFingerprint(qrCodeContent []byte) (*textsecure.CombinedFingerprints, error)
based on https://github.com/signalapp/Signal-Android/blob/6f39f9849a002f6361d192a00fbd7c52ffaf3bba/app/src/main/java/org/thoughtcrime/securesms/VerifyIdentityActivity.java#L403 and https://github.com/signalapp/libsignal-protocol-java/blob/3662b6d705ae4162ad8b3a242daf35171edbb068/java/src/main/java/org/whispersystems/libsignal/fingerprint/ScannableFingerprint.java#L54
Types ¶
This section is empty.