cryptos

package
v1.1.45 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DesKeyLetter = helps.StrNumberAlpha // des密鑰字串
View Source
const DesKeySize = 8 // des密鑰長度

Variables

This section is empty.

Functions

func MD5String

func MD5String(input []byte) string

MD5String 取得md5字串

func RandDesKey

func RandDesKey() []byte

RandDesKey 產生隨機des密鑰

func RandDesKeyString

func RandDesKeyString() string

RandDesKeyString 產生隨機des密鑰字串

Types

type Base64 added in v1.1.0

type Base64 struct {
}

Base64 base64加密/解密器

func NewBase64 added in v1.1.0

func NewBase64() *Base64

NewBase64 建立base64加密/解密器

func (*Base64) Decode added in v1.1.0

func (this *Base64) Decode(input any) (output any, err error)

Decode 解密

func (*Base64) Encode added in v1.1.0

func (this *Base64) Encode(input any) (output any, err error)

Encode 加密

type DesCBC added in v1.1.0

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

DesCBC des-cbc加密/解密器

func NewDesCBC added in v1.1.0

func NewDesCBC(padding Padding, key, iv string) *DesCBC

NewDesCBC 建立des-cbc加密/解密器

func (*DesCBC) Decode added in v1.1.0

func (this *DesCBC) Decode(input any) (output any, err error)

Decode 解密

func (*DesCBC) Encode added in v1.1.0

func (this *DesCBC) Encode(input any) (output any, err error)

Encode 加密

type DesECB added in v1.1.0

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

DesECB des-ecb加密/解密器

func NewDesECB added in v1.1.0

func NewDesECB(padding Padding, key string) *DesECB

NewDesECB 建立des-ecb加密/解密器

func (*DesECB) Decode added in v1.1.0

func (this *DesECB) Decode(input any) (output any, err error)

Decode 解密

func (*DesECB) Encode added in v1.1.0

func (this *DesECB) Encode(input any) (output any, err error)

Encode 加密

type Padding

type Padding = int

Padding 填充模式

const (
	PaddingZero  Padding = iota // zeropad填充
	PaddingPKCS7                // pkcs7填充
)

Jump to

Keyboard shortcuts

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