Documentation ¶
Overview ¶
package evp provides wrappers around OpenSSL's generic evp interfaces for symmetric/asymetric ciphers and digests
Index ¶
- Constants
- Variables
- func CleanUpCipherCtx(ctx *CipherCtx)
- func OpenSSLAddAllAlgorithms()
- func OpenSSLAddAllCiphers()
- func OpenSSLAddAllDigests()
- type Cipher
- type CipherCtx
- func (ctx *CipherCtx) BlockSize() int
- func (ctx *CipherCtx) Cipher() *Cipher
- func (ctx *CipherCtx) Decrypt(dst, src []byte) error
- func (ctx *CipherCtx) DecryptFinal(out []byte) (int, error)
- func (ctx *CipherCtx) DecryptInit(cipher *Cipher, key []byte, iv []byte) error
- func (ctx *CipherCtx) DecryptUpdate(dst []byte, src []byte) (int, error)
- func (ctx *CipherCtx) Encrypt(dst, src []byte) error
- func (ctx *CipherCtx) EncryptFinal(out []byte) (int, error)
- func (ctx *CipherCtx) EncryptInit(cipher *Cipher, key []byte, iv []byte) error
- func (ctx *CipherCtx) EncryptUpdate(out []byte, in []byte) (int, error)
- func (ctx *CipherCtx) IVLength() int
- func (ctx *CipherCtx) KeyLength() int
- func (ctx *CipherCtx) Mode() int
- func (ctx *CipherCtx) SetPadding(pad int) int
- func (ctx *CipherCtx) Type() int
- type Digest
- type PKey
Constants ¶
View Source
const ( EVP_CIPH_STREAM_CIPHER int = 0x0 EVP_CIPH_ECB_MODE int = 0x1 EVP_CIPH_CBC_MODE int = 0x2 EVP_CIPH_CFB_MODE int = 0x3 EVP_CIPH_OFB_MODE int = 0x4 EVP_CIPH_CTR_MODE int = 0x5 EVP_CIPH_GCM_MODE int = 0x6 EVP_CIPH_CCM_MODE int = 0x7 EVP_CIPH_XTS_MODE int = 0x10001 EVP_CIPH_MODE int = 0xF0007 )
Variables ¶
Functions ¶
func CleanUpCipherCtx ¶
func CleanUpCipherCtx(ctx *CipherCtx)
func OpenSSLAddAllAlgorithms ¶
func OpenSSLAddAllAlgorithms()
func OpenSSLAddAllCiphers ¶
func OpenSSLAddAllCiphers()
func OpenSSLAddAllDigests ¶
func OpenSSLAddAllDigests()
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
func CipherByName ¶
func CipherByNid ¶
type CipherCtx ¶
type CipherCtx struct {
// contains filtered or unexported fields
}
func (*CipherCtx) DecryptInit ¶
func (*CipherCtx) DecryptUpdate ¶
func (*CipherCtx) EncryptInit ¶
func (*CipherCtx) EncryptUpdate ¶
func (*CipherCtx) SetPadding ¶
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
Interface to message digest algorithms
type PKey ¶
Wrapper around OpenSSL's EVP_PKEY
func LoadPrivateKeyDER ¶
func LoadPrivateKeyPEM ¶
Helper function to load a private key from it's bytes
Click to show internal directories.
Click to hide internal directories.