Documentation ¶
Overview ¶
Package sha256 implements encryption/decryption functions by sha256
Index ¶
- func GetCipher(cipherKeyFilePath string) c.IEdgeCipherer
- type Cipher
- func (ec *Cipher) DecryptByte(byteData []byte) (decryptedByte []byte, err error)
- func (ec *Cipher) DecryptByteToJSON(data []byte) (jsonMap map[string]interface{}, err error)
- func (ec *Cipher) EncryptByte(byteData []byte) (encryptedByte []byte, err error)
- func (ec *Cipher) EncryptJSONToByte(jsonMap map[string]interface{}) (encryptedByte []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCipher ¶
func GetCipher(cipherKeyFilePath string) c.IEdgeCipherer
GetCipher set passphrase for ciphering
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
Cipher has passphrase for ciphering
func (*Cipher) DecryptByte ¶
DecryptByte decrypts from []byte to []byte
func (*Cipher) DecryptByteToJSON ¶
DecryptByteToJSON decrypts from []byte to map[string]interface{}
func (*Cipher) EncryptByte ¶
EncryptByte encrypts from []byte to []byte
Click to show internal directories.
Click to hide internal directories.