Documentation ¶
Index ¶
- func CBCDecrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func CBCEncrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func CFBDecrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func CFBEncrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func CTRDecrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func CTREncrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func ECBDecrypt(block cipher.Block, src []byte, padding PaddingType) ([]byte, error)
- func ECBEncrypt(block cipher.Block, src []byte, padding PaddingType) ([]byte, error)
- func NewECBDecrypt(b cipher.Block) cipher.BlockMode
- func NewECBEncrypt(b cipher.Block) cipher.BlockMode
- func OFBDecrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func OFBEncrypt(block cipher.Block, data, iv []byte, padding PaddingType) ([]byte, error)
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) ([]byte, error)
- func PKCS7Padding(src []byte, blockSize int) []byte
- func PKCS7UnPadding(src []byte) ([]byte, error)
- func Padding(padding PaddingType, src []byte, blockSize int) []byte
- func UnPadding(padding PaddingType, src []byte) ([]byte, error)
- func ZerosPadding(src []byte, blockSize int) []byte
- func ZerosUnPadding(src []byte) ([]byte, error)
- type PaddingType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CBCDecrypt ¶ added in v0.9.9
CBCDecrypt CBC模式的解密
func CBCEncrypt ¶ added in v0.9.9
CBCEncrypt CBC模式的加密
func CFBDecrypt ¶ added in v0.9.9
CFBDecrypt CFB模式的解密
func CFBEncrypt ¶ added in v0.9.9
CFBEncrypt CFB模式的加密
func CTRDecrypt ¶ added in v0.9.9
CTRDecrypt CTR模式的解密
func CTREncrypt ¶ added in v0.9.9
CTREncrypt CTR模式的加密
func ECBDecrypt ¶ added in v0.9.9
ECBDecrypt ECB模式的解密
func ECBEncrypt ¶ added in v0.9.9
ECBEncrypt ECB模式的加密
func NewECBDecrypt ¶ added in v0.9.9
NewECBDecrypt returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypt ¶ added in v0.9.9
NewECBEncrypt returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func OFBDecrypt ¶ added in v0.9.9
OFBDecrypt OFB模式的解密
func OFBEncrypt ¶ added in v0.9.9
OFBEncrypt OFB模式的加密
func PKCS5Padding ¶ added in v0.9.9
func PKCS5UnPadding ¶ added in v0.9.9
func PKCS7Padding ¶ added in v0.9.9
func PKCS7UnPadding ¶ added in v0.9.9
func ZerosPadding ¶ added in v0.9.9
func ZerosUnPadding ¶ added in v0.9.9
Types ¶
type PaddingType ¶ added in v0.9.9
type PaddingType string
PaddingType 填充类型
var ( PKCS5 PaddingType = "PKCS5" PKCS7 PaddingType = "PKCS7" Zero PaddingType = "Zero" )
Click to show internal directories.
Click to hide internal directories.