Documentation ¶
Index ¶
- Constants
- func GetCNF(claims map[string]interface{}) (map[string]interface{}, error)
- func GetCryptoHash(sdAlg string) (crypto.Hash, error)
- func GetCryptoHashFromClaims(claims map[string]interface{}) (crypto.Hash, error)
- func GetDisclosedClaims(disclosureClaims []*DisclosureClaim, claims map[string]interface{}) (map[string]interface{}, error)
- func GetDisclosureDigests(claims map[string]interface{}) (map[string]bool, error)
- func GetHash(hash crypto.Hash, value string) (string, error)
- func GetKeyFromVC(key string, claims map[string]interface{}) (interface{}, bool)
- func GetSDAlg(claims map[string]interface{}) (string, error)
- func KeyExistsInMap(key string, m map[string]interface{}) bool
- func SliceToMap(ids []string) map[string]bool
- func VerifyDisclosuresInSDJWT(disclosures []string, signedJWT *afgjwt.JSONWebToken) error
- type CombinedFormatForIssuance
- type CombinedFormatForPresentation
- type DisclosureClaim
Constants ¶
const ( CombinedFormatSeparator = "~" SDAlgorithmKey = "_sd_alg" SDKey = "_sd" CNFKey = "cnf" )
CombinedFormatSeparator is disclosure separator.
Variables ¶
This section is empty.
Functions ¶
func GetCryptoHash ¶
GetCryptoHash returns crypto hash from SD algorithm.
func GetCryptoHashFromClaims ¶
GetCryptoHashFromClaims returns crypto hash from claims.
func GetDisclosedClaims ¶
func GetDisclosedClaims(disclosureClaims []*DisclosureClaim, claims map[string]interface{}) (map[string]interface{}, error)
GetDisclosedClaims returns disclosed claims only.
func GetDisclosureDigests ¶
GetDisclosureDigests returns digests from claims map.
func GetKeyFromVC ¶
GetKeyFromVC returns key value from VC.
func KeyExistsInMap ¶
KeyExistsInMap checks if key exists in map.
func VerifyDisclosuresInSDJWT ¶
func VerifyDisclosuresInSDJWT(disclosures []string, signedJWT *afgjwt.JSONWebToken) error
VerifyDisclosuresInSDJWT checks for disclosure inclusion in SD-JWT.
Types ¶
type CombinedFormatForIssuance ¶
CombinedFormatForIssuance holds SD-JWT and disclosures.
func ParseCombinedFormatForIssuance ¶
func ParseCombinedFormatForIssuance(combinedFormatForIssuance string) *CombinedFormatForIssuance
ParseCombinedFormatForIssuance parses combined format for issuance into CombinedFormatForIssuance parts.
func (*CombinedFormatForIssuance) Serialize ¶
func (cf *CombinedFormatForIssuance) Serialize() string
Serialize will assemble combined format for issuance.
type CombinedFormatForPresentation ¶
type CombinedFormatForPresentation struct { SDJWT string Disclosures []string HolderBinding string }
CombinedFormatForPresentation holds SD-JWT, disclosures and optional holder binding info.
func ParseCombinedFormatForPresentation ¶
func ParseCombinedFormatForPresentation(combinedFormatForPresentation string) *CombinedFormatForPresentation
ParseCombinedFormatForPresentation parses combined format for presentation into CombinedFormatForPresentation parts.
func (*CombinedFormatForPresentation) Serialize ¶
func (cf *CombinedFormatForPresentation) Serialize() string
Serialize will assemble combined format for presentation.
type DisclosureClaim ¶
DisclosureClaim defines claim.
func GetDisclosureClaims ¶
func GetDisclosureClaims(disclosures []string) ([]*DisclosureClaim, error)
GetDisclosureClaims de-codes disclosures.