Documentation ¶
Index ¶
- type Opt
- type ProofCreator
- func (c *ProofCreator) CreateJWTHeaders(params jwt.SignParameters) (jose.Headers, error)
- func (c *ProofCreator) GetLDPCanonicalDocument(proof *proof.Proof, doc map[string]interface{}, opts ...processor.Opts) ([]byte, error)
- func (c *ProofCreator) GetLDPDigest(proof *proof.Proof, doc []byte) ([]byte, error)
- func (c *ProofCreator) LDPJWTAlg(proof *proof.Proof, keyType kms.KeyType) (string, error)
- func (c *ProofCreator) SignCWT(params cwt.SignParameters, cborData []byte) ([]byte, error)
- func (c *ProofCreator) SignJWT(params jwt.SignParameters, data []byte) ([]byte, error)
- func (c *ProofCreator) SignLinkedDocument(proof *proof.Proof, keyType kms.KeyType, doc []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt func(c *ProofCreator)
Opt represent ProofCreator creation options.
func WithJWTAlg ¶
func WithJWTAlg(proofDesc proofdesc.JWTProofDescriptor, cryptographicSigner cryptographicSigner) Opt
WithJWTAlg option to set supported jwt alg.
func WithLDProofType ¶
func WithLDProofType(proofDesc proofdesc.LDProofDescriptor, cryptographicSigner cryptographicSigner) Opt
WithLDProofType option to set supported ld proof.
type ProofCreator ¶
type ProofCreator struct {
// contains filtered or unexported fields
}
ProofCreator incapsulate logic of proof creation.
func (*ProofCreator) CreateJWTHeaders ¶
func (c *ProofCreator) CreateJWTHeaders(params jwt.SignParameters) (jose.Headers, error)
CreateJWTHeaders creates correct jwt headers.
func (*ProofCreator) GetLDPCanonicalDocument ¶
func (c *ProofCreator) GetLDPCanonicalDocument(proof *proof.Proof, doc map[string]interface{}, opts ...processor.Opts) ([]byte, error)
GetLDPCanonicalDocument will return normalized/canonical version of the document.
func (*ProofCreator) GetLDPDigest ¶
GetLDPDigest returns document digest.
func (*ProofCreator) SignCWT ¶ added in v1.1.1
func (c *ProofCreator) SignCWT(params cwt.SignParameters, cborData []byte) ([]byte, error)
SignCWT will sign document and return signature.
func (*ProofCreator) SignJWT ¶
func (c *ProofCreator) SignJWT(params jwt.SignParameters, data []byte) ([]byte, error)
SignJWT will sign document and return signature.
func (*ProofCreator) SignLinkedDocument ¶
func (c *ProofCreator) SignLinkedDocument(proof *proof.Proof, keyType kms.KeyType, doc []byte) ([]byte, error)
SignLinkedDocument will sign document and return signature.
Click to show internal directories.
Click to hide internal directories.