sha256

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package sha256 implements encryption/decryption functions by sha256

Index

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

func (ec *Cipher) DecryptByte(byteData []byte) (decryptedByte []byte, err error)

DecryptByte decrypts from []byte to []byte

func (*Cipher) DecryptByteToJSON

func (ec *Cipher) DecryptByteToJSON(data []byte) (jsonMap map[string]interface{}, err error)

DecryptByteToJSON decrypts from []byte to map[string]interface{}

func (*Cipher) EncryptByte

func (ec *Cipher) EncryptByte(byteData []byte) (encryptedByte []byte, err error)

EncryptByte encrypts from []byte to []byte

func (*Cipher) EncryptJSONToByte

func (ec *Cipher) EncryptJSONToByte(jsonMap map[string]interface{}) (encryptedByte []byte, err error)

EncryptJSONToByte encrypts from map[string]interface{} to []byte

Jump to

Keyboard shortcuts

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