xcrypt

package
v0.0.0-...-f89cf20 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 5 Imported by: 0

README

XCrypt

提供了快速加解密的方法。

AES

// 参数分别对应 要加密的数据, 密钥, 初始化向量
// 加密
func AesEncryptRaw(data []byte, key []byte, iv []byte) ([]byte, error)
// 解密
func AesDecryptRaw(data []byte, key []byte, iv []byte) ([]byte, error)

Documentation

Index

Constants

View Source
const AesCipherKeySize = 32 // aes key size, 256 bit

Variables

This section is empty.

Functions

func AesDecryptRaw

func AesDecryptRaw(data []byte, key []byte, iv []byte) ([]byte, error)

AesEncryptRaw encrypt original `data` with `token` and initializer vector `iv` iv should have at least `aes.BlockSize` length

func AesEncryptRaw

func AesEncryptRaw(data []byte, key []byte, iv []byte) ([]byte, error)

AesEncryptRaw encrypt original `data` with `token` and initializer vector `iv` iv should have at least `aes.BlockSize` length

Types

This section is empty.

Jump to

Keyboard shortcuts

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