crypto

package
v0.0.0-...-710c528 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESCBCDecrypt

func AESCBCDecrypt(cypted []byte, key []byte, padding ...Padding) ([]byte, error)

AESCBCDecrypt Aes CBC解密PKCS5

@param origData []byte 解密的字节数组

@param key []byte 密钥字节数组

func AESCBCEncrypt

func AESCBCEncrypt(origData []byte, key []byte, padding ...Padding) ([]byte, error)

AESCBCEncrypt AesCBC加密PKCS5

@param origData []byte 加密的字节数组

@param key []byte 密钥字节数组

func AESECBDecrypt

func AESECBDecrypt(cypted []byte, key []byte, padding ...Padding) ([]byte, error)

AESECBDecrypt Aes ECB解密PKCS5

@param origData []byte 解密的字节数组

@param key []byte 密钥字节数组

func AESECBEncrypt

func AESECBEncrypt(origData []byte, key []byte, padding ...Padding) ([]byte, error)

AESECBEncrypt Aes ECB加密PKCS5

@param origData []byte 加密的字节数组

@param key []byte 密钥字节数组

func MD5

func MD5(key []byte) []byte

func PKCS5Padding

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

PKCS5Padding PKCS5密钥填充方式

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding PKCS5密钥填充方式返填充

func PKCS7Padding

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

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

Types

type Padding

type Padding int
const (
	Padding5 Padding = iota + 1
	Padding7
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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