Documentation ¶
Overview ¶
Package crypto is a generated protocol buffer package.
It is generated from these files:
crypto.proto
It has these top-level messages:
Digest256
Index ¶
- func TextToPub(pub string) ([]byte, error)
- func Verify(pubKey []byte, digest *Digest256, sig []byte) bool
- type Digest256
- func (d *Digest256) AsMapKey() string
- func (*Digest256) Descriptor() ([]byte, []int)
- func (d *Digest256) EqualTo(other *Digest256) bool
- func (m *Digest256) GetData() []byte
- func (d Digest256) IsValid() bool
- func (*Digest256) ProtoMessage()
- func (m *Digest256) Reset()
- func (m *Digest256) String() string
- func (d *Digest256) ToText() string
- type Hasher256
- type SecureSigner
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Digest256 ¶
type Digest256 struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func NewDigest256 ¶
func TextToDigest256 ¶
func (*Digest256) Descriptor ¶
func (*Digest256) ProtoMessage ¶
func (*Digest256) ProtoMessage()
type Hasher256 ¶
type Hasher256 struct {
// contains filtered or unexported fields
}
func NewHasher256 ¶
func NewHasher256() *Hasher256
type SecureSigner ¶
type SecureSigner struct { Pubkey []byte PubKeyHex string PubkeyHash string ServiceId string KsUrl string KsPrivKey string // contains filtered or unexported fields }
func NewSecureSigner ¶
func NewSecureSigner(pubkeyHex, pubkeyHash string) *SecureSigner
NewSecureSigner 通过pubkeyhex和pubkeyhash生成一个新的SecureSigner对象。 pubkeyHex是非压缩的公钥
func (*SecureSigner) InitKeystoreParam ¶
func (signer *SecureSigner) InitKeystoreParam(ksPrivKey string, serviceId string, url string)
InitKeystoreParam 初始化访问keystore需要的私钥,仅需调用一次
Click to show internal directories.
Click to hide internal directories.