crypto

package
v0.0.0-...-3a038d9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAES

func NewAES(key []byte) (Cipher, error)

介绍:创建默认的AES Cipher,使用ECB工作模式、pkcs57填充,算法秘钥长度128 192 256 位 , 使用秘钥作为初始向量

作者:Alex 版本:release-1.1

func NewAESWith

func NewAESWith(key []byte, mode CipherMode) (Cipher, error)

介绍:根据指定的工作模式,创建AESCipher,算法秘钥长度128 192 256 位 , 使用秘钥作为初始向量

作者:Alex 版本:release-1.1

func NewDES

func NewDES(key []byte) (Cipher, error)

介绍:创建默认DESCipher,使用ECB工作模式、pkcs57填充,算法秘钥长度64位 , 使用秘钥作为初始向量

作者:Alex 版本:release-1.1

func NewDESWith

func NewDESWith(key []byte, mode CipherMode) (Cipher, error)

介绍:根据指定的工作模式,创建DESCipher,算法秘钥长度64位,使用秘钥作为初始向量

作者:Alex 版本:release-1.1

func NewRSA

func NewRSA(key rsa.Key) (rsa.Cipher, error)

介绍:创建RSACipher,默认使用pkcs1 padding,pkcs#1v1.5 加密解密,pkcs#1v1.5签名验证.

作者:Alex 版本:release-1.1

func NewRSAWith

func NewRSAWith(key rsa.Key, padding rsa.Padding, cipherMode rsa.CipherMode, signMode rsa.SignMode) (rsa.Cipher, error)

介绍:根据指定的key,和padding来创建RSACipher

作者:Alex 版本:release-1.1

Types

This section is empty.

Jump to

Keyboard shortcuts

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