crypto

package module
v0.0.0-...-6596117 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-crypto

Go Report Card Go.Dev reference Sourcegraph Release Goproxy.cn

常见加密

  • aes

  • base64

  • binary

  • charset

  • des

  • md5

  • rsa

  • sha1

  • uri

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

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

func New

func New(hash hash.Hash) *Crypto

func (*Crypto) EncryptBytes

func (c *Crypto) EncryptBytes(data []byte) (string, error)

EncryptBytes 加密字节

func (*Crypto) EncryptFile

func (c *Crypto) EncryptFile(path string) (string, error)

EncryptFile 加密文件

func (*Crypto) EncryptString

func (c *Crypto) EncryptString(data string) (string, error)

EncryptString 加密字符串

func (*Crypto) HashSum

func (c *Crypto) HashSum(data []byte) ([]byte, error)

func (*Crypto) WithSumByte

func (c *Crypto) WithSumByte(sumByte []byte) *Crypto

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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