Class SasBytes
java.lang.Object
io.github.fherbreteau.vodozemac.sas.SasBytes
Bytes generated from a shared secret that can be used as the short
authentication string (SAS).
The bytes can be converted into emoji indices or decimal numbers for visual key verification, as described in the Matrix spec.
- Author:
- François HERBRETEAU
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the raw 6 bytes of the short authentication string that are converted into the emoji and decimal representations.String[]decimals()Returns the three decimal numbers that can be presented to users to perform the key verification.int[]Returns the indices of 7 emojis that can be presented to users to perform the key verification.booleaninthashCode()toString()
-
Method Details
-
emojiIndices
public int[] emojiIndices()Returns the indices of 7 emojis that can be presented to users to perform the key verification.The table that maps each index to an emoji can be found in the Matrix spec.
- Returns:
- an array of 7 emoji indices
-
decimals
Returns the three decimal numbers that can be presented to users to perform the key verification.- Returns:
- an array of three decimal strings
-
bytes
public byte[] bytes()Returns the raw 6 bytes of the short authentication string that are converted into the emoji and decimal representations.- Returns:
- an array of 6 raw bytes
-
equals
-
hashCode
-
toString
-