cipher

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package cipher implements simple encrypting and decrypting message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HasCipher

type HasCipher struct {
	IsSetKey bool
	Key      IEdgeCipherer
}

HasCipher struct

func (*HasCipher) SetCipher

func (h *HasCipher) SetCipher(cipher IEdgeCipherer)

SetCipher function

type IEdgeCipherer

type IEdgeCipherer interface {
	EncryptByte(byteData []byte) (encryptedByte []byte, err error)
	EncryptJSONToByte(jsonMap map[string]interface{}) (encryptedByte []byte, err error)
	DecryptByte(byteData []byte) (decryptedByte []byte, err error)
	DecryptByteToJSON(data []byte) (jsonMap map[string]interface{}, err error)
}

IEdgeCipherer is the interface implemented by encryption/decryption functions

type Setter

type Setter interface {
	SetCipher(cipher IEdgeCipherer)
}

Setter interface

Directories

Path Synopsis
Package dummy provides the mocking functions
Package dummy provides the mocking functions
Package mock_cipher is a generated GoMock package.
Package mock_cipher is a generated GoMock package.
Package sha256 implements encryption/decryption functions by sha256
Package sha256 implements encryption/decryption functions by sha256

Jump to

Keyboard shortcuts

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