crypto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KERMIT_LITTLE = 0
	KERMIT_BIG    = 1
)
View Source
const AES_128_BLOCKSIZE = 16
View Source
const SHA1_LEN = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type AES128

type AES128 struct {
}

func (AES128) Crypt

func (obj AES128) Crypt(buffer []byte, key []byte, iv []byte) ([]byte, error)

func (AES128) CryptHex

func (obj AES128) CryptHex(buffer []byte, key []byte, iv []byte) (string, error)

func (AES128) PKCS5Padding

func (obj AES128) PKCS5Padding(ciphertext []byte) []byte

type CRC16

type CRC16 struct {
}

func (CRC16) Calculate

func (obj CRC16) Calculate(ba utils.ByteArray, seed uint16, littleEndian bool) []byte

func (CRC16) Validate

func (obj CRC16) Validate(ba utils.ByteArray, seed uint16, littleEndian bool) bool

type Luhn

type Luhn struct {
}

func (Luhn) Calculate

func (obj Luhn) Calculate(message string) string

func (Luhn) Validate

func (obj Luhn) Validate(message string) bool

type SHA1

type SHA1 struct {
}

func (SHA1) Sha1File

func (obj SHA1) Sha1File(filePath string) (string, error)

func (SHA1) Sha1String

func (obj SHA1) Sha1String(message string) (string, error)

Jump to

Keyboard shortcuts

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