Class Ed25519
Standalone Ed25519 keys, e.g. for cross-signing; keys and signatures are unpadded base64.
Namespace: Uniform.Matrix.Protocol.Crypto
Assembly: Uniform.Matrix.Protocol.Crypto.dll
public static class Ed25519
Methods
|
Edit this page
View Source
Create a random key; return the 32-byte secret seed and the public key, both base64.
Declaration
public static (string Secret, string PublicKey) GenerateKey()
Returns
|
Edit this page
View Source
Return the public key of a base64 secret seed; throw OlmException when it is not one.
Declaration
public static string GetPublicKey(string secret)
Parameters
| Type |
Name |
Description |
| string |
secret |
|
Returns
|
Edit this page
View Source
Sign UTF-8 message with a base64 secret seed; return the signature in base64.
Declaration
public static string Sign(string secret, string message)
Parameters
Returns
|
Edit this page
View Source
Return whether signature by publicKey is valid for UTF-8 message; malformed input is invalid.
Declaration
public static bool Verify(string publicKey, string message, string signature)
Parameters
Returns