Cryptor

package
v0.0.0-...-f8d661f Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidBlockSize indicates hash blocksize <= 0.
	ErrInvalidBlockSize = errors.New("invalid blocksize")

	// ErrInvalidPKCS7Data indicates bad input to PKCS7 pad or unpad.
	ErrInvalidPKCS7Data = errors.New("invalid PKCS7 data (empty or not padded)")

	// ErrInvalidPKCS7Padding indicates PKCS7 unpad fails to bad input.
	ErrInvalidPKCS7Padding = errors.New("invalid padding on input")
)

Functions

func GenerateNumer

func GenerateNumer(min, max int) int

func Pkcs7Pad

func Pkcs7Pad(b []byte, blocksize int) ([]byte, error)

func RandStringBytes

func RandStringBytes(n int) string

func RandomBuffer

func RandomBuffer(size int) []byte

func VarNumberLength

func VarNumberLength(min, max int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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