Documentation ¶
Index ¶
- func MustParseASN1RSAPublicKey(data []byte) *rsa.PublicKey
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func ParseASN1RSAPublicKey(data []byte) (*rsa.PublicKey, error)
- func RSAEncrypt(pubkey *rsa.PublicKey, msg []byte) ([]byte, error)
- func SHA1String(data []byte) string
- func SHA1Sum(data []byte) []byte
- func SymmetricDecrypt(ciph cipher.Block, src []byte) []byte
- func SymmetricEncrypt(ciph cipher.Block, src []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustParseASN1RSAPublicKey ¶
MustParseASN1RSAPublicKey is like ParseASN1RSAPublicKey but panics instead of returning an error.
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func ParseASN1RSAPublicKey ¶
ParseASN1RSAPublicKey parses a DER encoded RSA public key
func RSAEncrypt ¶
Encrypts a message with the given public key using RSA-OAEP and the SHA1 hash function.
func SHA1String ¶
func SymmetricDecrypt ¶
SymmetricDecrypt decrypts data from the reader using AES/CBC/PKCS7 with an IV prepended using AES/ECB/None. The src slice may not be used anymore.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.