encrypt

package
v0.0.0-...-a1d8bd3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(message []byte) ([]byte, error)

func Base64Encode

func Base64Encode(message []byte) []byte

func DecryptWithPrivateKey

func DecryptWithPrivateKey(ciphertext string, privateKey *rsa.PrivateKey) string

DecryptWithPrivateKey decrypts data with private key

func EncryptWithPublicKey

func EncryptWithPublicKey(message string, publicKey *rsa.PublicKey) string

EncryptWithPublicKey encrypts data with public key

func RsaDecrypt

func RsaDecrypt(toDecrypt string, privateKeyPath string) *string

func RsaEncrypt

func RsaEncrypt(toEncrypt string, privateKeyPath string) *string

func RsaGenerate

func RsaGenerate() (*rsa.PrivateKey, *rsa.PublicKey)

func RsaPrivateFromString

func RsaPrivateFromString(privateKeyPem string) *rsa.PrivateKey

func RsaPrivateToString

func RsaPrivateToString(privateKey *rsa.PrivateKey) string

func RsaPublicFromString

func RsaPublicFromString(publicKey string) *rsa.PublicKey

func RsaPublicToString

func RsaPublicToString(publicKey *rsa.PublicKey) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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