goaesecb

package module
v0.0.0-...-a51301c Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

go_aes_ecb

Golang support for AES/ECB Encrypt/Decrypt

AES 是通用的一种标准,已经进入 RFC ,参见 RFC 3826

目前 AES 有这样几种加密方式

  1. Electronic Codebook, ECB

  2. Cipher Block Chaining CBC

  3. Cipher Feedback CFB

  4. Output Feedback OFB

  5. Counter CTR

其中 Golang 出于一些考虑,废弃了对于 ECB 的支持,但是 AES/ECB 适用范围依旧比较广泛,所以自己做了一个库来实现一套

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) ([]byte, error)

AesDecrypt is AES-ECB decrypt function

func AesEncrypt

func AesEncrypt(origData, key []byte) ([]byte, error)

AesEncrypt is AES-ECB encrypt function

func NewECBDecrypted

func NewECBDecrypted(b cipher.Block) cipher.BlockMode

NewECBDecrypted is AES Tool function

func NewECBEncrypted

func NewECBEncrypted(b cipher.Block) cipher.BlockMode

NewECBEncrypted is AES Tool function

func PKCS5Padding

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

PKCS5Padding is AES Tool function

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding is AES Tool function

Types

This section is empty.

Jump to

Keyboard shortcuts

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