crypto

package
v0.0.15-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptAES256CBC

func DecryptAES256CBC(ciphertext, key, iv []byte) ([]byte, error)

func EncryptAES256CBC

func EncryptAES256CBC(plaintext, key []byte) (string, error)

EncryptAES256CBC 使用 AES-256-CBC 加密明文 返回: base64编码的IV + 密文, 错误信息

func EncryptAES256CBCRaw

func EncryptAES256CBCRaw(plaintext, key []byte) ([]byte, error)

EncryptAES256CBCRaw 可选的独立加密函数,返回原始字节(IV + 密文)

func Pkcs5Padding

func Pkcs5Padding(origData []byte, blockSize int) []byte

func Pkcs5UnPadding

func Pkcs5UnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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