Documentation ¶
Index ¶
- func Base64UrlEncode(p []byte) string
- type ConditionType
- type Conditions
- func (c Conditions) Cost() int
- func (c *Conditions) DecodeCondition(encodedCondition []byte) (*Conditions, error)
- func (c *Conditions) Encode() ([]byte, error)
- func (c *Conditions) Equals(other *Conditions) bool
- func (c Conditions) Fingerprint() []byte
- func (c Conditions) Type() ConditionType
- func (c *Conditions) URI() string
- type Ed25519Sha256
- func (f Ed25519Sha256) Condition() *Conditions
- func (f Ed25519Sha256) ConditionType() ConditionType
- func (f Ed25519Sha256) Cost() int
- func (f Ed25519Sha256) DecodeFulfillment(encodedFulfillment []byte) error
- func (f Ed25519Sha256) Ed25519PublicKey() ed25519.PublicKey
- func (f Ed25519Sha256) Encode() ([]byte, error)
- func (f Ed25519Sha256) Validate(condition *Conditions, message []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64UrlEncode ¶
Types ¶
type ConditionType ¶
type ConditionType int
const ( CTThresholdSha256 ConditionType = 2 CTEd25519Sha256 ConditionType = 4 )
func (ConditionType) IsCompound ¶
func (t ConditionType) IsCompound() bool
func (ConditionType) String ¶
func (t ConditionType) String() string
type Conditions ¶
type Conditions struct {
// contains filtered or unexported fields
}
func NewSimpleCondition ¶
func NewSimpleCondition(conditionType ConditionType, fingerprint []byte, cost int) *Conditions
func (Conditions) Cost ¶
func (c Conditions) Cost() int
func (*Conditions) DecodeCondition ¶
func (c *Conditions) DecodeCondition(encodedCondition []byte) (*Conditions, error)
func (*Conditions) Encode ¶
func (c *Conditions) Encode() ([]byte, error)
func (*Conditions) Equals ¶
func (c *Conditions) Equals(other *Conditions) bool
func (Conditions) Fingerprint ¶
func (c Conditions) Fingerprint() []byte
func (Conditions) Type ¶
func (c Conditions) Type() ConditionType
func (*Conditions) URI ¶
func (c *Conditions) URI() string
type Ed25519Sha256 ¶
type Ed25519Sha256 struct {
// contains filtered or unexported fields
}
func NewEd25519Sha256 ¶
func NewEd25519Sha256(pubkey []byte, signature []byte) (*Ed25519Sha256, error)
func (Ed25519Sha256) Condition ¶
func (f Ed25519Sha256) Condition() *Conditions
func (Ed25519Sha256) ConditionType ¶
func (f Ed25519Sha256) ConditionType() ConditionType
func (Ed25519Sha256) Cost ¶
func (f Ed25519Sha256) Cost() int
func (Ed25519Sha256) DecodeFulfillment ¶
func (f Ed25519Sha256) DecodeFulfillment(encodedFulfillment []byte) error
func (Ed25519Sha256) Ed25519PublicKey ¶
func (f Ed25519Sha256) Ed25519PublicKey() ed25519.PublicKey
func (Ed25519Sha256) Encode ¶
func (f Ed25519Sha256) Encode() ([]byte, error)
func (Ed25519Sha256) Validate ¶
func (f Ed25519Sha256) Validate(condition *Conditions, message []byte) error
Click to show internal directories.
Click to hide internal directories.