crypto

package
v0.0.0-...-2d926ca Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(key, text []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(key, plain []byte) ([]byte, error)

func EciesDecrypt

func EciesDecrypt(raw []byte, ciphertext []byte) ([]byte, error)

func EciesEncrypt

func EciesEncrypt(raw []byte, plain []byte) ([]byte, error)

func GenerateKey

func GenerateKey(len int) []byte

func PEMtoCertificate

func PEMtoCertificate(raw []byte) (*x509.Certificate, error)

PEMtoCertificate converts pem to x509

func PEMtoPrivateKey

func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error)

PEMtoPrivateKey unmarshals a pem to private key

Types

This section is empty.

Jump to

Keyboard shortcuts

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