Documentation ¶
Index ¶
- Constants
- func AllPublicKeys(channel *bcgo.Channel, cache bcgo.Cache, network bcgo.Network) (map[string]*rsa.PublicKey, error)
- func CreateAliasRecord(alias string, publicKey []byte, publicKeyFormat cryptogo.PublicKeyFormat, ...) (*bcgo.Record, error)
- func CreateSignedAliasRecord(alias string, privateKey *rsa.PrivateKey) (*bcgo.Record, error)
- func GetPublicKey(channel *bcgo.Channel, cache bcgo.Cache, network bcgo.Network, alias string) (*rsa.PublicKey, error)
- func GetPublicKeys(channel *bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) map[string]*rsa.PublicKey
- func IterateAliases(channel *bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func OpenAliasChannel() *bcgo.Channel
- func Register(node *bcgo.Node, listener bcgo.MiningListener) error
- func RegisterAlias(host, alias string, key *rsa.PrivateKey) error
- func UniqueAlias(channel *bcgo.Channel, cache bcgo.Cache, network bcgo.Network, alias string) error
- func ValidateAlias(alias string) error
- type Alias
- func (*Alias) Descriptor() ([]byte, []int)
- func (m *Alias) GetAlias() string
- func (m *Alias) GetPublicFormat() cryptogo.PublicKeyFormat
- func (m *Alias) GetPublicKey() []byte
- func (*Alias) ProtoMessage()
- func (m *Alias) Reset()
- func (m *Alias) String() string
- func (m *Alias) XXX_DiscardUnknown()
- func (m *Alias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Alias) XXX_Merge(src proto.Message)
- func (m *Alias) XXX_Size() int
- func (m *Alias) XXX_Unmarshal(b []byte) error
- type AliasValidator
Constants ¶
View Source
const ( ALIAS = "Alias" ALIAS_THRESHOLD = bcgo.THRESHOLD_G MAX_ALIAS_LENGTH = 100 MIN_ALIAS_LENGTH = 1 ERROR_ALIAS_ALREADY_REGISTERED = "Alias Already Registered: %s" ERROR_ALIAS_INVALID = "Alias Invalid: %s" ERROR_ALIAS_NOT_FOUND = "Could Not Find Alias For Public Key" ERROR_ALIAS_NOT_PUBLIC = "Cannot Register Private Alias" ERROR_ALIAS_TOO_LONG = "Alias Too Long: %d Maximum: %d" ERROR_ALIAS_TOO_SHORT = "Alias Too Short: %d Minimum: %d" ERROR_PUBLIC_KEY_NOT_FOUND = "Could Not Find Public Key For Alias: %s" )
Variables ¶
This section is empty.
Functions ¶
func AllPublicKeys ¶ added in v1.1.6
func CreateAliasRecord ¶
func CreateAliasRecord(alias string, publicKey []byte, publicKeyFormat cryptogo.PublicKeyFormat, signature []byte, signatureAlgorithm cryptogo.SignatureAlgorithm) (*bcgo.Record, error)
func CreateSignedAliasRecord ¶
func GetPublicKey ¶
func GetPublicKeys ¶
func IterateAliases ¶
func OpenAliasChannel ¶
func RegisterAlias ¶
func RegisterAlias(host, alias string, key *rsa.PrivateKey) error
func UniqueAlias ¶
func ValidateAlias ¶
Validates alias is the correct length and all characters are in the set [a-zA-Z0-9.-_]
Types ¶
type Alias ¶
type Alias struct { Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` PublicFormat cryptogo.PublicKeyFormat `` /* 126-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Alias) Descriptor ¶
func (*Alias) GetPublicFormat ¶
func (m *Alias) GetPublicFormat() cryptogo.PublicKeyFormat
func (*Alias) GetPublicKey ¶
func (*Alias) ProtoMessage ¶
func (*Alias) ProtoMessage()
func (*Alias) XXX_DiscardUnknown ¶
func (m *Alias) XXX_DiscardUnknown()
func (*Alias) XXX_Marshal ¶
func (*Alias) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.