Documentation
¶
Index ¶
- Constants
- func JoinSignatures(identities []token.Identity, sigmas map[string][]byte) ([]byte, error)
- func Unwrap(raw []byte) (bool, []token.Identity, error)
- func UnwrapAuditInfo(info []byte) (bool, [][]byte, error)
- func WrapAuditInfo(recipients [][]byte) ([]byte, error)
- func WrapIdentities(ids ...token.Identity) (token.Identity, error)
- type AuditInfo
- type AuditInfoDeserializer
- type AuditInfoMatcher
- type IdentityAuditInfo
- type InfoMatcher
- type MultiIdentity
- type MultiSignature
- type TypedIdentityDeserializer
- func (d *TypedIdentityDeserializer) DeserializeVerifier(typ identity.Type, id []byte) (driver.Verifier, error)
- func (d *TypedIdentityDeserializer) GetAuditInfo(ctx context.Context, id driver.Identity, typ identity.Type, rawIdentity []byte, ...) ([]byte, error)
- func (d *TypedIdentityDeserializer) GetAuditInfoMatcher(owner driver.Identity, auditInfo []byte) (driver.Matcher, error)
- func (d *TypedIdentityDeserializer) Recipients(id driver.Identity, typ identity.Type, raw []byte) ([]driver.Identity, error)
- type Verifier
- type VerifierDES
Constants ¶
const Multisig = "ms"
Multisig is the type of a multisig identity. It is used to identify a multisig identity in a typed identity (identity.TypedIdentity).
Variables ¶
This section is empty.
Functions ¶
func JoinSignatures ¶
JoinSignatures joins the signatures of the given identities into a single signature The order of the signatures is the same as the order of the identities.
func Unwrap ¶
Unwrap returns the identities wrapped in the given multisig identity It returns the identities and a boolean indicating whether the given identity is a multisig identity
func UnwrapAuditInfo ¶
UnwrapAuditInfo returns the audit infos wrapped in the given multisig audit info. It returns the audit infos and a boolean indicating whether the given info is a multisig audit info.
func WrapAuditInfo ¶
WrapAuditInfo wraps the given audit infos into a multisig audit info
Types ¶
type AuditInfo ¶
type AuditInfo struct {
IdentityAuditInfos []IdentityAuditInfo
}
AuditInfo represents the audit info of a multisig identity. It is a sequence of audit infos from different identities. The order of the audit infos is the same as the order of the identities.
func (*AuditInfo) EnrollmentID ¶
func (*AuditInfo) RevocationHandle ¶
type AuditInfoDeserializer ¶
type AuditInfoDeserializer struct { }
func (*AuditInfoDeserializer) DeserializeAuditInfo ¶
func (a *AuditInfoDeserializer) DeserializeAuditInfo(raw []byte) (driver2.AuditInfo, error)
type AuditInfoMatcher ¶
type IdentityAuditInfo ¶
type IdentityAuditInfo struct {
AuditInfo []byte
}
IdentityAuditInfo represents the audit info of an identity
type InfoMatcher ¶
InfoMatcher matches a multisig identity to its own audit info. It is composed of a list of matchers, one for each identity in the multisig identity.
func (*InfoMatcher) Match ¶
func (e *InfoMatcher) Match(raw []byte) error
type MultiIdentity ¶
func (*MultiIdentity) Bytes ¶
func (m *MultiIdentity) Bytes() ([]byte, error)
func (*MultiIdentity) Deserialize ¶
func (m *MultiIdentity) Deserialize(raw []byte) error
func (*MultiIdentity) Serialize ¶
func (m *MultiIdentity) Serialize() ([]byte, error)
type MultiSignature ¶
type MultiSignature struct {
Signatures [][]byte
}
MultiSignature represents a multi-signature It is a sequence of signatures from different identities on the same message. The order of the signatures is the same as the order of the identities.
func (*MultiSignature) Bytes ¶
func (m *MultiSignature) Bytes() ([]byte, error)
func (*MultiSignature) FromBytes ¶
func (m *MultiSignature) FromBytes(raw []byte) error
type TypedIdentityDeserializer ¶
type TypedIdentityDeserializer struct { VerifierDeserializer VerifierDES AuditInfoMatcher AuditInfoMatcher }
func NewTypedIdentityDeserializer ¶
func NewTypedIdentityDeserializer(verifierDeserializer VerifierDES, auditInfoDeserializer AuditInfoMatcher) *TypedIdentityDeserializer