Versions in this module Expand all Collapse all v0 v0.2.0 Mar 23, 2023 v0.1.0 Jul 20, 2022 Changes in this version + const PrivKeyName + const PrivKeySize + const PubKeyName + const PubKeySize + const SignatureSize + var ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") + func GenerateKey() *sm2.PrivateKey + func GetPublickey(privateKey *sm2.PrivateKey) *sm2.PublicKey + func PrivateKeyDecrypt(privateKey *sm2.PrivateKey, ciphertxt []byte) (plaintext []byte) + func PrivateKeySign(privateKey *sm2.PrivateKey, msg []byte) ([]byte, error) + func PublicKeyEncrypt(publicKey *sm2.PublicKey, msg []byte) []byte + func PublicKeyVerify(publicKey *sm2.PublicKey, msg, sign []byte) bool + func Sm2() + func TextMatch(msg, plaintext []byte) bool + type PrivKey struct + Key []byte + func GenPrivKey() PrivKey + func GenPrivKeyFromSecret(secret []byte) PrivKey + func (*PrivKey) Descriptor() ([]byte, []int) + func (*PrivKey) ProtoMessage() + func (m *PrivKey) GetKey() []byte + func (m *PrivKey) Marshal() (dAtA []byte, err error) + func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) + func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *PrivKey) Reset() + func (m *PrivKey) Size() (n int) + func (m *PrivKey) String() string + func (m *PrivKey) Unmarshal(dAtA []byte) error + func (m *PrivKey) XXX_DiscardUnknown() + func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *PrivKey) XXX_Merge(src proto.Message) + func (m *PrivKey) XXX_Size() int + func (m *PrivKey) XXX_Unmarshal(b []byte) error + func (privKey *PrivKey) UnmarshalAmino(bz []byte) error + func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error + func (privKey PrivKey) Bytes() []byte + func (privKey PrivKey) Equals(other crypto.PrivKey) bool + func (privKey PrivKey) GetPrivateKey() *sm2.PrivateKey + func (privKey PrivKey) MarshalAmino() ([]byte, error) + func (privKey PrivKey) MarshalAminoJSON() ([]byte, error) + func (privKey PrivKey) PubKey() crypto.PubKey + func (privKey PrivKey) Sign(msg []byte) ([]byte, error) + func (privKey PrivKey) Type() string + type PubKey struct + Key []byte + func (*PubKey) Descriptor() ([]byte, []int) + func (*PubKey) ProtoMessage() + func (m *PubKey) GetKey() []byte + func (m *PubKey) Marshal() (dAtA []byte, err error) + func (m *PubKey) MarshalTo(dAtA []byte) (int, error) + func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *PubKey) Reset() + func (m *PubKey) Size() (n int) + func (m *PubKey) Unmarshal(dAtA []byte) error + func (m *PubKey) XXX_DiscardUnknown() + func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *PubKey) XXX_Merge(src proto.Message) + func (m *PubKey) XXX_Size() int + func (m *PubKey) XXX_Unmarshal(b []byte) error + func (pubKey *PubKey) AsTmPubKey() crypto.PubKey + func (pubKey *PubKey) Type() string + func (pubKey *PubKey) UnmarshalAmino(bz []byte) error + func (pubKey *PubKey) UnmarshalAminoJSON(bz []byte) error + func (pubKey *PubKey) VerifySignature(msg []byte, sig []byte) bool + func (pubKey PubKey) Address() crypto.Address + func (pubKey PubKey) Bytes() []byte + func (pubKey PubKey) Equals(other crypto.PubKey) bool + func (pubKey PubKey) MarshalAmino() ([]byte, error) + func (pubKey PubKey) MarshalAminoJSON() ([]byte, error) + func (pubKey PubKey) String() string