v0.0.0-...-8ecc595 Latest Latest

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 17 Imported by: 0




This section is empty.


This section is empty.


func ByteCountIEC

func ByteCountIEC(b int64) string

ByteCountIEC -

func ByteCountSI

func ByteCountSI(b int64) string

ByteCountSI -

func BytesToPrivateKey

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

BytesToPrivateKey bytes to private key

func BytesToPublicKey

func BytesToPublicKey(pub []byte) *rsa.PublicKey

BytesToPublicKey bytes to public key

func CreateHash

func CreateHash(key string) string

CreateHash -

func Decrypt

func Decrypt(data []byte, passphrase string) []byte

Decrypt -

func DecryptWithPrivateKey

func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) []byte

DecryptWithPrivateKey decrypts data with private key

func Encrypt

func Encrypt(data []byte, passphrase string) []byte

Encrypt -

func EncryptWithPublicKey

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

EncryptWithPublicKey -

func GenerateCert

func GenerateCert(keySize int) (pv, cer []byte, err error)

GenerateCert -

func GenerateKeyPair

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

GenerateKeyPair generates a new key pair

func GenerateUUID

func GenerateUUID() string

GenerateUUID -

func PrivateKeyToBytes

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

PrivateKeyToBytes private key to bytes

func PublicKeyToBytes

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

PublicKeyToBytes public key to bytes


This section is empty.

Jump to

Keyboard shortcuts

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