Documentation ¶
Index ¶
- Variables
- func CalculateProofIdentifier(proof *gabi.ProofD) []byte
- func CalculateTimeBasedChallenge(unixTimeSeconds int64) *big.Int
- func ComputeAttributeInts(attributeTypes []string, attributes [][]byte) ([]*big.Int, error)
- func DebugSerializableStruct(s interface{})
- func DecodeAttributeInt(a *big.Int) []byte
- func DecodeMetadataAttribute(metadataAttribute *big.Int) (credentialVersion int, issuerPkId string, attributeTypes []string, err error)
- func ExtractProofVersion(proofPrefixed []byte) (proofVersionByte byte, proofBase45 []byte, err error)
- func GenerateNonce() *big.Int
- func HasNLPrefix(bts []byte) bool
- func MaxCores() int
- func RandomBigInt(numBits uint) *big.Int
- type CreateCredentialMessage
- type CredentialMetadataSerialization
- type FindIssuerPkFunc
- type IssueSpecificationMessage
- type ProofSerializationV2
- type ProofSerializationV3
Constants ¶
This section is empty.
Variables ¶
View Source
var AttributeTypes = map[int][]string{
2: {
"isSpecimen",
"isPaperProof",
"validFrom",
"validForHours",
"firstNameInitial",
"lastNameInitial",
"birthDay",
"birthMonth",
},
3: {
"isSpecimen",
"isPaperProof",
"validFrom",
"validForHours",
"firstNameInitial",
"lastNameInitial",
"birthDay",
"birthMonth",
"category",
},
}
View Source
var BigOne = big.NewInt(1)
View Source
var GabiSystemParameters = gabi.DefaultSystemParameters[2048]
View Source
var ProofVersionByteV2 byte = '2'
View Source
var ProofVersionByteV3 byte = '3'
Functions ¶
func CalculateProofIdentifier ¶ added in v0.6.0
CalculateProofIdentifier calculates the sha256 digest of ProofD.C, truncated to 128 bits
func ComputeAttributeInts ¶
func DebugSerializableStruct ¶
func DebugSerializableStruct(s interface{})
func DecodeAttributeInt ¶
func DecodeMetadataAttribute ¶
func ExtractProofVersion ¶ added in v0.8.2
func GenerateNonce ¶
func HasNLPrefix ¶ added in v0.8.2
func MaxCores ¶ added in v0.5.0
func MaxCores() int
MaxCores returns the number of cores in the current system
func RandomBigInt ¶
RandomBigInt returns a random big integer value in the range [0,(2^numBits)-1], inclusive.
Types ¶
type CreateCredentialMessage ¶
type CreateCredentialMessage struct { IssueSignatureMessage *gabi.IssueSignatureMessage `json:"issueSignatureMessage"` Attributes [][]byte `json:"attributes"` }
type FindIssuerPkFunc ¶ added in v0.3.0
type IssueSpecificationMessage ¶ added in v0.7.2
type ProofSerializationV2 ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.