rscrypto

package
v0.0.0-...-a87b5f3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecryptECB

func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)

func AesEncryptECB

func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)

func GenerateAesKey

func GenerateAesKey(data string) string

=================== ECB ======================

func GenerateRsaKey

func GenerateRsaKey() ([]byte, []byte, error)

=================== RSA ==================================== https://www.sohamkamani.com/golang/rsa-encryption/

func RsaDecrypt

func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)

func RsaEncrypt

func RsaEncrypt(origData, publicKey []byte) ([]byte, error)

func RsaSign

func RsaSign(origData, privateKey []byte) (string, error)

func RsaVerify

func RsaVerify(origData, signature, publicKey []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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