encrypt

package
v0.0.0-...-5a7003e Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Md5

func Md5(str string) string

func Sha1Encode

func Sha1Encode(s string) string

Types

type Rsae

type Rsae struct{}

Rsae rsae

func NewRsae

func NewRsae() *Rsae

NewRsae new rsae

func (Rsae) AESDecrypt

func (r Rsae) AESDecrypt(ciphertext, key, iv []byte) ([]byte, error)

AESDecrypt aes decrypt

func (Rsae) AESEncrypt

func (r Rsae) AESEncrypt(plantText, key, iv []byte) ([]byte, error)

AESEncrypt aes encrypt

func (Rsae) Base64Decode

func (r Rsae) Base64Decode(data string) ([]byte, error)

Base64Decode base64 descode

func (Rsae) Base64Encode

func (r Rsae) Base64Encode(data []byte) string

Base64Encode base64 encode

func (Rsae) HmacSha1

func (r Rsae) HmacSha1(publicKey, privateKey string) []byte

HmacSha1 hmac sha1

func (Rsae) Md516

func (r Rsae) Md516(data string) string

Md516 md5 16

func (Rsae) Md532

func (r Rsae) Md532(data string) string

Md532 md5 32

func (Rsae) PKCS7Padding

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

PKCS7Padding pkcs7 padding

func (Rsae) PKCS7UnPadding

func (r Rsae) PKCS7UnPadding(plantText []byte, blockSize int) []byte

PKCS7UnPadding pkcs7 unpadding

func (Rsae) Pbkdf2Sha256

func (r Rsae) Pbkdf2Sha256(data, salt string, iterations int) string

Pbkdf2Sha256 pbkdf2 sha256

func (Rsae) RSADecrypt

func (r Rsae) RSADecrypt(ciphertext string, privateKey []byte) (string, error)

RSADecrypt rsa decarypt

func (Rsae) RSAEncrypt

func (r Rsae) RSAEncrypt(origdata string, publicKey []byte) (string, error)

RSAEncrypt rsa entrypt

func (Rsae) RSASign

func (r Rsae) RSASign(origdata string, privateKey []byte) (string, error)

RSASign rsa sign

func (Rsae) RSAVerify

func (r Rsae) RSAVerify(origdata, ciphertext string, publicKey []byte) (bool, error)

RSAVerify rsa verify

func (Rsae) SHA1

func (r Rsae) SHA1(data string) []byte

SHA1 sha1

func (Rsae) SHA256

func (r Rsae) SHA256(data string) []byte

SHA256 sha256

Jump to

Keyboard shortcuts

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