Commit e4d97606 authored by Tomas's avatar Tomas
Browse files

The hash of an AttributeIdentifier is actually a hash of the credential

parent 3ca0691f
......@@ -32,8 +32,8 @@ type CredentialIdentifier struct {
// AttributeIdentifier identifies an attribute instance.
type AttributeIdentifier struct {
Type AttributeTypeIdentifier
Hash string
Type AttributeTypeIdentifier
CredentialHash string
}
// IrmaIdentifierSet contains a set (ensured by using map[...]struct{}) of all scheme managers,
......@@ -122,7 +122,7 @@ func (id AttributeTypeIdentifier) IsCredential() bool {
// CredentialIdentifier returns the credential identifier of this attribute.
func (ai *AttributeIdentifier) CredentialIdentifier() CredentialIdentifier {
return CredentialIdentifier{Type: ai.Type.CredentialTypeIdentifier(), Hash: ai.Hash}
return CredentialIdentifier{Type: ai.Type.CredentialTypeIdentifier(), Hash: ai.CredentialHash}
}
// MarshalText implements encoding.TextMarshaler.
......
......@@ -442,7 +442,7 @@ func (client *Client) Candidates(disjunction *irma.AttributeDisjunction) []*irma
continue
}
for _, attrs := range creds {
id := &irma.AttributeIdentifier{Type: attribute, Hash: attrs.Hash()}
id := &irma.AttributeIdentifier{Type: attribute, CredentialHash: attrs.Hash()}
if attribute.IsCredential() {
candidates = append(candidates, id)
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment