Class EstablishedSas
Shared secret of a SAS verification: emoji or decimals to compare, and MACs over the keys being verified.
Inheritance
EstablishedSas
Namespace: Uniform.Matrix.Protocol.Crypto
Assembly: Uniform.Matrix.Protocol.Crypto.dll
public sealed class EstablishedSas : IDisposable
Methods
|
Edit this page
View Source
Calculate the MAC of input, e.g. a key, with info; base64.
Declaration
public string CalculateMac(string input, string info)
Parameters
Returns
|
Edit this page
View Source
Return the 3 four-digit numbers of bytes: 13 bits each from the first 39 bits, plus 1000.
Declaration
public static int[] Decimals(byte[] bytes)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Return the 7 emoji indices of bytes: 6 bits each from the first 42 bits.
Declaration
public static int[] EmojiIndices(byte[] bytes)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
Declaration
public byte[] GetBytes(string info)
Parameters
| Type |
Name |
Description |
| string |
info |
|
Returns
|
Edit this page
View Source
Return whether mac is the MAC of input with info.
Declaration
public bool VerifyMac(string input, string info, string mac)
Parameters
Returns
Implements