cryptos

package
v0.0.0-...-8c76e24 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESCBCDecrypt

func AESCBCDecrypt(key, iv, cipherText []byte) ([]byte, error)

AESCBCDecrypt is given key, iv to decrypt the cipherText in AES CBC way.

func AESCBCEncrypt

func AESCBCEncrypt(key, iv, plainText []byte) ([]byte, error)

AESCBCEncrypt is given key, iv to encrypt the plainText in AES CBC way.

func AESECBDecrypt

func AESECBDecrypt(key, cipherText []byte) ([]byte, error)

AESECBDecrypt is given key to decrypt the cipherText in AES ECB way.

func AESECBEncrypt

func AESECBEncrypt(key, plainText []byte) ([]byte, error)

AESECBEncrypt is given key to encrypt the plainText in AES ECB way.

func DecryptPriKey

func DecryptPriKey(prikey, passphrase []byte) (*rsa.PrivateKey, error)

func OAEPDecrypt

func OAEPDecrypt(pub *rsa.PublicKey, pri *rsa.PrivateKey, cipherText []byte) ([]byte, error)

func ParseASk

func ParseASk(ask string) ([]byte, error)

func ParsePublicCertification

func ParsePublicCertification(pubCert []byte) (*rsa.PublicKey, error)

func RSADecryptByKey

func RSADecryptByKey(privateKey *rsa.PrivateKey, ciphertext []byte) ([]byte, error)

func RSAEncryptByCert

func RSAEncryptByCert(pemCertificate *rsa.PublicKey, origData []byte) ([]byte, error)

func RSAEncryptByKey

func RSAEncryptByKey(publicKey *rsa.PublicKey, origData []byte) ([]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