encoding

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPrivateKey

func FormatPrivateKey(raw string) (result []byte)

func FormatPublicKey

func FormatPublicKey(raw string) (result []byte)

func ParsePKCS1PrivateKey

func ParsePKCS1PrivateKey(data []byte) (key *rsa.PrivateKey, err error)

func ParsePKCS1PublicKey

func ParsePKCS1PublicKey(data []byte) (key *rsa.PublicKey, err error)

func RSADecryptPKCS1

func RSADecryptPKCS1(ciphertext, key []byte) ([]byte, error)

func RSADecryptPKCS1WithKey

func RSADecryptPKCS1WithKey(ciphertext []byte, key *rsa.PrivateKey) ([]byte, error)

func RSAEncryptPKCS1

func RSAEncryptPKCS1(plaintext, key []byte) ([]byte, error)

func RSAEncryptPKCS1WithKey

func RSAEncryptPKCS1WithKey(plaintext []byte, key *rsa.PublicKey) ([]byte, error)

func SignPKCS1v15

func SignPKCS1v15(src, key []byte, hash crypto.Hash) ([]byte, error)

func SignPKCS1v15WithKey

func SignPKCS1v15WithKey(src []byte, key *rsa.PrivateKey, hash crypto.Hash) ([]byte, error)

func VerifyPKCS1v15

func VerifyPKCS1v15(src, sig, key []byte, hash crypto.Hash) error

func VerifyPKCS1v15WithKey

func VerifyPKCS1v15WithKey(src, sig []byte, key *rsa.PublicKey, hash crypto.Hash) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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