ciphers

package
v0.0.0-...-0e964c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 EncryptLargeString

func EncryptLargeString(key crypto.PublicKey, s string) ([]string, error)

func EncryptWithPublicRSAKey

func EncryptWithPublicRSAKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)

EncryptWithPublicRSAKey encrypts data with public key

func GenerateKeyPair

func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)

GenerateKeyPair generates a new key pair

func MarshalPublicKey

func MarshalPublicKey(pub *rsa.PublicKey) ([]byte, error)

func MarshalRSAPrivateKey

func MarshalRSAPrivateKey(priv *rsa.PrivateKey) string

func ParsePublicKey

func ParsePublicKey(s string) (crypto.PublicKey, error)

func PrivateKeyToBytes

func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte

PrivateKeyToBytes private key to bytes

func PublicKeyToBytes

func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error)

PublicKeyToBytes public key to bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL