padding

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//PaddingNull 不填充
	PaddingNull = "NULL"
	//PaddingPkcs7 .
	PaddingPkcs7 = "PKCS7"
	//PaddingPkcs5 .
	PaddingPkcs5 = "PKCS5"
	//PaddingZero 0填充
	PaddingZero = "ZERO"
)

Variables

This section is empty.

Functions

func GetSecretMode

func GetSecretMode(name string) (mode, padding string, err error)

GetModePadding 解析加密模式和填充模式

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

PKCS5Padding PKCS5填充模式

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding 去除PKCS5的补码

func PKCS7Padding

func PKCS7Padding(data []byte) []byte

PKCS7Padding PKCS7填充模式

func PKCS7UnPadding

func PKCS7UnPadding(data []byte) []byte

PKCS7UnPadding 去除PKCS7的补码

func ZeroPadding

func ZeroPadding(ciphertext []byte, blockSize int) []byte

ZeroPadding Zero填充模式

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

ZeroUnPadding 去除Zero的补码

Types

This section is empty.

Jump to

Keyboard shortcuts

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