Documentation
¶
Overview ¶
Package crypto includes objects for hashing and encryption
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESEncrypt ¶
type AESEncrypt struct {
// contains filtered or unexported fields
}
AESEncrypt handles encryption/decryption for the AES cipher
func (*AESEncrypt) Decrypt ¶
func (e *AESEncrypt) Decrypt(in []byte) ([]byte, error)
Decrypt decrypts the given byte slice with the AES cipher
func (*AESEncrypt) Encrypt ¶
func (e *AESEncrypt) Encrypt(in []byte) ([]byte, error)
Encrypt encrypts the given byte slice with the AES cipher
func (*AESEncrypt) Key ¶
func (e *AESEncrypt) Key() []byte
Key returns the currently set key as []bytes
type EncryptionHandler ¶
type EncryptionHandler interface {
Encrypt(in []byte) ([]byte, error)
Decrypt(in []byte) ([]byte, error)
Key() []byte
}
EncryptionHandler is an interface for encryption/decryption objects
func NewEncryptionHandler ¶
func NewEncryptionHandler(key, encType string, hashHandler HashHandler) EncryptionHandler
NewEncryptionHandler creates a struct for handler encryption/decryption
type HashHandler ¶
HashHandler implements a hashing processor interface
func NewHashHandler ¶
func NewHashHandler(algorithm string) HashHandler
NewHashHandler creates a new instance of a HashHandler object
type HashProcess ¶
type HashProcess struct {
// contains filtered or unexported fields
}
HashProcess is an object for performing hash functions on strings
Click to show internal directories.
Click to hide internal directories.