gaes

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package gaes provides useful API for AES encryption/decryption algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)

AES解密, 使用CBC模式,注意key必须为16/24/32位长度,iv初始化向量为非必需参数

func Encrypt

func Encrypt(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)

AES加密, 使用CBC模式,注意key必须为16/24/32位长度,iv初始化向量为非必需参数

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(src []byte, blockSize int) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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