Versions in this module Expand all Collapse all v1 v1.0.1 Nov 22, 2024 v1.0.0 Nov 11, 2024 Changes in this version + type KeyPair struct + func NewKeyPair() *KeyPair + func (k *KeyPair) DecryptByPrivateKey(src []byte) (dst []byte, err error) + func (k *KeyPair) DecryptByPublicKey(src []byte) (dst []byte, err error) + func (k *KeyPair) EncryptByPrivateKey(src []byte) (dst []byte, err error) + func (k *KeyPair) EncryptByPublicKey(src []byte) (dst []byte, err error) + func (k *KeyPair) IsPrivateKey() bool + func (k *KeyPair) IsPublicKey() bool + func (k *KeyPair) IsSupportedHash() bool + func (k *KeyPair) SetHash(hash crypto.Hash) + func (k *KeyPair) SetPrivateKey(privateKey []byte) + func (k *KeyPair) SetPublicKey(publicKey []byte) + func (k *KeyPair) SignByPrivateKey(src []byte) (dst []byte, err error) + func (k *KeyPair) VerifyByPublicKey(src, sign []byte) (err error)