Documentation
¶
Index ¶
- func DecryptLargeString(key *rsa.PrivateKey, chunks []string) ([]byte, error)
- func DecryptWithPrivateRSAKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncryptLargeString(key crypto.PublicKey, s string) ([]string, error)
- func EncryptWithPublicRSAKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func MarshalPublicKey(pub *rsa.PublicKey) ([]byte, error)
- func MarshalRSAPrivateKey(priv *rsa.PrivateKey) string
- func ParsePublicKey(s string) (crypto.PublicKey, error)
- func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
- func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptLargeString ¶
func DecryptLargeString(key *rsa.PrivateKey, chunks []string) ([]byte, error)
func DecryptWithPrivateRSAKey ¶
func DecryptWithPrivateRSAKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
DecryptWithPrivateRSAKey decrypts data with private key
func EncryptWithPublicRSAKey ¶
EncryptWithPublicRSAKey encrypts data with public key
func GenerateKeyPair ¶
GenerateKeyPair generates a new key pair
func MarshalRSAPrivateKey ¶
func MarshalRSAPrivateKey(priv *rsa.PrivateKey) string
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
PrivateKeyToBytes private key to bytes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.