aesKit

package
v3.0.57 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DecryptCbcPKCS5Padding func(cipherData []byte, key []byte, iv ...[]byte) ([]byte, error) = gaes.DecryptCBC

DecryptCbcPKCS5Padding

加密模式: CBC 填充方式: PKCS5Padding

View Source
var DecryptCfbZeroPadding func(cipherData []byte, key []byte, unPadding int, iv ...[]byte) ([]byte, error) = gaes.DecryptCFB

DecryptCfbZeroPadding

加密模式: CFB 填充方式: ZeroPadding

View Source
var DecryptEcbPKCS5Padding func(key, cipherData []byte) ([]byte, error) = codec.EcbDecrypt

DecryptEcbPKCS5Padding 密文([]byte) => 明文([]byte)

View Source
var EncryptCbcPKCS5Padding func(plainData []byte, key []byte, iv ...[]byte) ([]byte, error) = gaes.EncryptCBC

EncryptCbcPKCS5Padding

加密模式: CBC 填充方式: PKCS5Padding

View Source
var EncryptCfbZeroPadding func(plainData []byte, key []byte, padding *int, iv ...[]byte) ([]byte, error) = gaes.EncryptCFB

EncryptCfbZeroPadding

加密模式: CFB 填充方式: ZeroPadding

View Source
var EncryptEcbPKCS5Padding func(key, plainText []byte) ([]byte, error) = codec.EcbEncrypt

EncryptEcbPKCS5Padding 明文([]byte) => 密文([]byte)

Functions

func DecryptCbcPKCS5PaddingFromString

func DecryptCbcPKCS5PaddingFromString(base64Str string, key []byte, iv ...[]byte) ([]byte, error)

DecryptCbcPKCS5PaddingFromString 密文(string) => 明文([]byte)

func DecryptCfbZeroPaddingFromString

func DecryptCfbZeroPaddingFromString(base64Str string, key []byte, unPadding int, iv ...[]byte) ([]byte, error)

DecryptCfbZeroPaddingFromString 密文(string) => 明文([]byte)

func DecryptEcbPKCS5PaddingFromString

func DecryptEcbPKCS5PaddingFromString(key []byte, cipherText string) ([]byte, error)

DecryptEcbPKCS5PaddingFromString 密文(base64 string) => 明文([]byte)

@param key 密钥(must be 16/24/32 bit length)

func EncryptCbcPKCS5PaddingToString

func EncryptCbcPKCS5PaddingToString(plainData []byte, key []byte, iv ...[]byte) (string, error)

EncryptCbcPKCS5PaddingToString 明文([]byte) => 密文(string)

@param key 密钥(must be 16/24/32 bit length) @param iv 偏移量, (1) 默认: []byte("I Love Go Frame!")

(2) 建议长度为16(由于源码中的 aes.BlockSize)

func EncryptCfbZeroPaddingToString

func EncryptCfbZeroPaddingToString(plainData []byte, key []byte, padding *int, iv ...[]byte) (string, error)

EncryptCfbZeroPaddingToString 明文([]byte) => 密文(string)

@param key 密钥(must be 16/24/32 bit length) @param iv 偏移量, (1) 默认: []byte("I Love Go Frame!")

(2) 建议长度为16(由于源码中的 aes.BlockSize)

func EncryptEcbPKCS5PaddingToString

func EncryptEcbPKCS5PaddingToString(key []byte, plainData []byte) (string, error)

EncryptEcbPKCS5PaddingToString 明文([]byte) => 密文(base64 string)

@param key 密钥(must be 16/24/32 bit length)

Types

This section is empty.

Jump to

Keyboard shortcuts

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