crypto

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ECBSize = 7
)

Functions

func AES

func AES(handle cipher.Stream, m []byte) []byte

func AESInit

func AESInit(k []byte, iv []byte, decrypt bool) cipher.Stream

func AES_CFB

func AES_CFB(k []byte, iv []byte, m []byte, decrypt bool) []byte

func CBC

func CBC(b []byte) []byte

func CRC32

func CRC32(m []byte) ([]byte, error)

func DES

func DES(k []byte, d []byte) []byte

func DESL

func DESL(k []byte, d []byte) []byte

func DES_ECB

func DES_ECB(k []byte, d []byte, encrypt bool) []byte

func DES_ECB_LM added in v1.0.2

func DES_ECB_LM(k uint32, b []byte) ([]byte, error)

DES_ECB_LM encrypts the data using the algorithm specified in https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/b1b0094f-2546-431f-b06d-582158a9f2bb

func ECB

func ECB(in []byte) []byte

func ECBP

func ECBP(in []byte) []byte

func HMAC added in v1.2.0

func HMAC(k []byte, h func() hash.Hash, ms ...any) ([]byte, error)

func HMACMD5 added in v1.2.0

func HMACMD5(k []byte, ms ...any) ([]byte, error)

func HMACSHA256 added in v1.2.0

func HMACSHA256(k []byte, ms ...any) ([]byte, error)

func MD4

func MD4(ms ...any) ([]byte, error)

func MD5

func MD5(ms ...any) ([]byte, error)

func MakeHash added in v1.2.0

func MakeHash(h hash.Hash, ms ...any) ([]byte, error)

func NewAESCFB8

func NewAESCFB8(k []byte, iv []byte, decrypt bool) cipher.Stream

func Nonce

func Nonce(n int) ([]byte, error)

func PAD

func PAD(b []byte, n int) []byte

func RC4K added in v1.2.0

func RC4K(k []byte, m []byte) error

func WriteHash added in v1.2.0

func WriteHash(h io.Writer, ms ...any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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