Documentation
¶
Index ¶
- func DecryptLargeString(key *rsa.PrivateKey, chunks []string) ([]byte, error)
- func DecryptLargeStringWithEd25519(key ed25519.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 GenerateEd25519KeyPair() (ed25519.PrivateKey, ed25519.PublicKey, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func MarshalEd25519PrivateKey(priv ed25519.PrivateKey) (string, error)
- func MarshalEd25519PublicKey(pub ed25519.PublicKey) ([]byte, 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 DecryptLargeStringWithEd25519 ¶
func DecryptLargeStringWithEd25519(key ed25519.PrivateKey, chunks []string) ([]byte, error)
DecryptLargeStringWithEd25519 decrypts data encrypted with ed25519 hybrid encryption
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 GenerateEd25519KeyPair ¶
func GenerateEd25519KeyPair() (ed25519.PrivateKey, ed25519.PublicKey, error)
GenerateEd25519KeyPair generates a new ed25519 key pair
func GenerateKeyPair ¶
GenerateKeyPair generates a new RSA key pair
func MarshalEd25519PrivateKey ¶
func MarshalEd25519PrivateKey(priv ed25519.PrivateKey) (string, error)
MarshalEd25519PrivateKey marshals an ed25519 private key to PEM format
func MarshalEd25519PublicKey ¶
MarshalEd25519PublicKey marshals an ed25519 public key to SSH authorized key format
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.