Versions in this module Expand all Collapse all v0 v0.0.1 Jul 26, 2021 Changes in this version + var ErrDataBroken = errors.New("data broken, first byte is not zero") + var ErrDataLen = errors.New("data length error") + var ErrDataToLarge = errors.New("message to long for RSA public key size") + var ErrDecryption = errors.New("decryption error") + var ErrKeyPairDismatch = errors.New("data is not encrypted by the private key") + var ErrPrivateKey = errors.New("get private key error") + var ErrPublicKey = errors.New("get public key error") + var RSA = &Security + type Security struct + func (sec *Security) GetPrivateKey() (*rsa.PrivateKey, error) + func (sec *Security) GetPublicKey() (*rsa.PublicKey, error) + func (sec *Security) PriKeyDecrypt(input []byte) ([]byte, error) + func (sec *Security) PriKeyEncrypt(input []byte) ([]byte, error) + func (sec *Security) PubKeyDecrypt(input []byte) ([]byte, error) + func (sec *Security) PubKeyEncrypt(input []byte) ([]byte, error) + func (sec *Security) SetPrivateKey(priStr string) (err error) + func (sec *Security) SetPublicKey(pubStr string) (err error)