cryptography

package
v0.0.0-...-e8da0a6 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cipher enigma.Cipher
)

Functions

func CipherSet

func CipherSet() (enigma.Cipher, bool)

func EnigmaDecode

func EnigmaDecode(bytes []byte) ([]byte, error)

func EnigmaEncode

func EnigmaEncode(bytes []byte) ([]byte, error)

func LoadConfig

func LoadConfig(config Config) error

Types

type CipherHeader

type CipherHeader map[string][]string

CipherHeader

func (*CipherHeader) Scan

func (cj *CipherHeader) Scan(value interface{}) error

func (CipherHeader) Value

func (cj CipherHeader) Value() (driver.Value, error)

type CipherObject

type CipherObject map[string]interface{}

CipherObject

func (*CipherObject) Scan

func (cj *CipherObject) Scan(value interface{}) error

func (CipherObject) Value

func (cj CipherObject) Value() (driver.Value, error)

type CipherString

type CipherString string

CipherString

func (*CipherString) Scan

func (cs *CipherString) Scan(value interface{}) error

func (CipherString) Value

func (cs CipherString) Value() (driver.Value, error)

type Config

type Config struct {
	EnigmaConfig enigma.Config `yaml:"enigma"`
}

Config

 enigma:
	blockMethod: aes    # NONE, AES, DES
	blockSize: 128      # NONE: default(1), AES: 128|192|256, DES: 64
	blockKey: secret    # (base64 string)
	cipherMode: gcm     # NONE: NONE|AES|DES , GCM: AES, CBC: NONE|AES|DES
	cipherSalt: null    # NULL, (base64 string)
	padding: PKCS       # NONE: AES+GCM, PKCS: AES+NONE|AES+CBC|DES+NONE|DES+CBC
	strconv: base64     # plain|base64|hex

Jump to

Keyboard shortcuts

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