crypt

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCFBDecrypt

func AesCFBDecrypt(cipherText, key []byte) ([]byte, error)

AesCFBDecrypt Aes解密

func AesCFBEncrypt

func AesCFBEncrypt(msg, key []byte) ([]byte, error)

AesCFBDecrypt Aes加密

func HMacMD5

func HMacMD5(s string, key []byte) string

HMacMD5 生成hmac hash

func MD5

func MD5(s string) string

MD5 生成md5摘要

func Md5Stream

func Md5Stream(reader io.Reader) (string, error)

Md5Stream 流式处理

func Md5Sum

func Md5Sum(filename string) (string, error)

func SHA1

func SHA1(s string) string

SHA1 生成sha1摘要

func SHA1Stream

func SHA1Stream(reader io.Reader) (string, error)

SHA1Stream 流式处理

func SHA1StreamSum

func SHA1StreamSum(filename string) (string, error)

Types

type Rsa

type Rsa struct {
	// contains filtered or unexported fields
}

func NewRsa

func NewRsa(publicKeyReader io.Reader, privateKeyReader io.Reader) (*Rsa, error)

NewRsa 创建Rsa

func (*Rsa) Decrypt

func (r *Rsa) Decrypt(cipherText []byte) ([]byte, error)

Decrypt Rsa解密

func (*Rsa) Encrypt

func (r *Rsa) Encrypt(msg []byte) ([]byte, error)

RsaEncrypt Rsa加密

Jump to

Keyboard shortcuts

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