Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyInput = errors.New("empty input") ErrSignatureNotFound = errors.New("input JSON doesn't contain signature from specified device") )
Functions ¶
func VerifySignature ¶
VerifySignature verifies an Ed25519 signature.
func VerifySignatureJSON ¶
VerifySignatureJSON verifies the signature in the given JSON object "obj" as described in Appendix 3 of the Matrix Spec.
This function is a wrapper over [Utility.VerifySignatureJSON] that creates and destroys the [Utility] object transparently.
If the "obj" is not already a json.RawMessage, it will re-encoded as JSON for the verification, so "json" tags will be honored.
Types ¶
type Signatures ¶
Signatures represents a set of signatures for some data from multiple users and keys.
func NewSingleSignature ¶
func NewSingleSignature(userID id.UserID, algorithm id.KeyAlgorithm, keyID string, signature string) Signatures
NewSingleSignature creates a new Signatures object with a single signature.
Click to show internal directories.
Click to hide internal directories.