utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TypeXORBase64 byte = 0x01
	TypeAES       byte = 0x02
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, toDecrypt []byte) ([]byte, error)

func DecryptWithAES

func DecryptWithAES(key, src []byte) ([]byte, error)

func DecryptWithXORBase64

func DecryptWithXORBase64(key, src []byte) ([]byte, error)

func Encrypt

func Encrypt(key, toEncrypt []byte, encType byte) ([]byte, error)

func EncryptWithAES

func EncryptWithAES(key, src []byte) ([]byte, error)

AES

func EncryptWithXORBase64

func EncryptWithXORBase64(key, src []byte) ([]byte, error)

XORBase64

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(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