blockcrypt

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BlockCrypt_BlockCrypt_MAX = BlockCrypt_BlockCrypt_SALSA20

BlockCrypt_BlockCrypt_MAX is the maximum value for BlockCrypt.

Variables

View Source
var (
	BlockCrypt_name = map[int32]string{
		0: "BlockCrypt_UNKNOWN",
		1: "BlockCrypt_NONE",
		2: "BlockCrypt_AES256",
		3: "BlockCrypt_AES128",
		4: "BlockCrypt_AES192",
		6: "BlockCrypt_XOR",
		7: "BlockCrypt_3DES",
		8: "BlockCrypt_SALSA20",
	}
	BlockCrypt_value = map[string]int32{
		"BlockCrypt_UNKNOWN": 0,
		"BlockCrypt_NONE":    1,
		"BlockCrypt_AES256":  2,
		"BlockCrypt_AES128":  3,
		"BlockCrypt_AES192":  4,
		"BlockCrypt_XOR":     6,
		"BlockCrypt_3DES":    7,
		"BlockCrypt_SALSA20": 8,
	}
)

Enum value maps for BlockCrypt.

View Source
var File_github_com_aperturerobotics_bifrost_util_blockcrypt_blockcrypt_proto protoreflect.FileDescriptor
View Source
var RemovedBlockCrypt = []BlockCrypt{BlockCrypt(5)}

RemovedBlockCrypt is the list of deprecated block crypt IDs.

Functions

This section is empty.

Types

type BlockCrypt

type BlockCrypt int32

BlockCrypt sets the type of block crypto to use.

const (
	// BlockCrypt_UNKNOWN defaults to BlockCrypt_AES256
	BlockCrypt_BlockCrypt_UNKNOWN BlockCrypt = 0
	// BlockCrypt_NONE is unencrypted.
	BlockCrypt_BlockCrypt_NONE BlockCrypt = 1
	// BlockCrypt_AES256 is AES 256-bit block encryption.
	BlockCrypt_BlockCrypt_AES256 BlockCrypt = 2
	// BlockCrypt_AES128 is AES 128-bit block encryption.
	BlockCrypt_BlockCrypt_AES128 BlockCrypt = 3
	// BlockCrypt_AES192 is AES 192-bit block encryption.
	BlockCrypt_BlockCrypt_AES192 BlockCrypt = 4
	// BlockCrypt_XOR is simple XOR block encryption.
	BlockCrypt_BlockCrypt_XOR BlockCrypt = 6
	// BlockCrypt_3DES is 3des 24-bit block encryption.
	BlockCrypt_BlockCrypt_3DES BlockCrypt = 7
	// BlockCrypt_SALSA20 is salsa20 32-bit block encryption.
	BlockCrypt_BlockCrypt_SALSA20 BlockCrypt = 8
)

func (BlockCrypt) Descriptor added in v0.2.0

func (BlockCrypt) Descriptor() protoreflect.EnumDescriptor

func (BlockCrypt) Enum added in v0.2.0

func (x BlockCrypt) Enum() *BlockCrypt

func (BlockCrypt) EnumDescriptor deprecated

func (BlockCrypt) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockCrypt.Descriptor instead.

func (BlockCrypt) Number added in v0.2.0

func (x BlockCrypt) Number() protoreflect.EnumNumber

func (BlockCrypt) String

func (x BlockCrypt) String() string

func (BlockCrypt) Type added in v0.2.0

type Crypt

type Crypt interface {
	// Encrypt encrypts the whole block in src into dst.
	// Dst and src may point at the same memory.
	Encrypt(dst, src []byte)

	// Decrypt decrypts the whole block in src into dst.
	// Dst and src may point at the same memory.
	Decrypt(dst, src []byte)
}

Crypt defines encryption/decryption methods for a given byte slice. Notes on implementing: the data to be encrypted contains a builtin nonce at the first 16 bytes

func BuildBlockCrypt

func BuildBlockCrypt(crypt BlockCrypt, pass []byte) (Crypt, error)

BuildBlockCrypt builds block crypt from known types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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