Documentation ¶
Overview ¶
Package ed25519signature2020 implements the Ed25519Signature2020 signature suite for the Linked Data Signatures [LD-SIGNATURES] specification. It uses the RDF Dataset Normalization Algorithm [RDF-DATASET-NORMALIZATION] to transform the input document into its canonical form. It uses SHA-256 [RFC6234] as the message digest algorithm and Ed25519 [ED25519] as the signature algorithm.
Index ¶
- Constants
- type Proof
- func (s *Proof) GetCanonicalDocument(doc map[string]interface{}, opts ...processor.Opts) ([]byte, error)
- func (s *Proof) GetDigest(doc []byte) []byte
- func (s *Proof) IsJWTAlgSupported(alg string) bool
- func (s *Proof) ProofType() string
- func (s *Proof) SupportedVerificationMethods() []proof.SupportedVerificationMethod
Constants ¶
const ( // ProofType for Ed25519Signature2020. ProofType = "Ed25519Signature2020" // VerificationMethodType for Ed25519Signature2020. VerificationMethodType = "Ed25519VerificationKey2020" // JWKKeyType for Ed25519Signature2020. JWKKeyType = "OKP" // JWKCurve for Ed25519Signature2020. JWKCurve = "Ed25519" // CorrespondedJWTAlg for Ed25519Signature2020. CorrespondedJWTAlg = "EdDSA" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proof ¶
type Proof struct {
// contains filtered or unexported fields
}
Proof describe Ed25519Signature2020 proof.
func (*Proof) GetCanonicalDocument ¶
func (s *Proof) GetCanonicalDocument(doc map[string]interface{}, opts ...processor.Opts) ([]byte, error)
GetCanonicalDocument will return normalized/canonical version of the document Ed25519Signature2020 signature SignatureSuite uses RDF Dataset Normalization as canonicalization algorithm.
func (*Proof) IsJWTAlgSupported ¶
IsJWTAlgSupported return jwt alg that corresponds to VerificationMethod.
func (*Proof) SupportedVerificationMethods ¶
func (s *Proof) SupportedVerificationMethods() []proof.SupportedVerificationMethod
SupportedVerificationMethods returns list of verification methods supported by this proof type.