Versions in this module Expand all Collapse all v1 v1.0.1 May 8, 2026 Changes in this version + var ErrDataBroken = errors.New("go-cryptobin/rsa: data broken, first byte is not zero") + var ErrDataLen = errors.New("go-cryptobin/rsa: data length error") + var ErrDataToLarge = errors.New("go-cryptobin/rsa: message too long for RSA public key size") + var ErrDecryption = errors.New("go-cryptobin/rsa: decryption error") + var ErrKeyPairDismatch = errors.New("go-cryptobin/rsa: data is not encrypted by the private key") + func LowerSafeDecrypt(priv *rsa.PrivateKey, msg []byte) ([]byte, error) + func LowerSafeEncrypt(pub *rsa.PublicKey, msg []byte) ([]byte, error) + func MarshalXMLPrivateKey(key *rsa.PrivateKey) ([]byte, error) + func MarshalXMLPublicKey(key *rsa.PublicKey) ([]byte, error) + func ParseXMLPrivateKey(der []byte) (*rsa.PrivateKey, error) + func ParseXMLPublicKey(der []byte) (*rsa.PublicKey, error) + func PrivateKeyBytes(pri *rsa.PrivateKey, in []byte, isEncrytp bool) ([]byte, error) + func PublicKeyBytes(pub *rsa.PublicKey, in []byte, isEncrytp bool) ([]byte, error) + type XMLKey struct + func NewXMLKey() XMLKey + func (this XMLKey) MarshalPrivateKey(key *rsa.PrivateKey) ([]byte, error) + func (this XMLKey) MarshalPublicKey(key *rsa.PublicKey) ([]byte, error) + func (this XMLKey) ParsePrivateKey(der []byte) (*rsa.PrivateKey, error) + func (this XMLKey) ParsePublicKey(der []byte) (*rsa.PublicKey, error)