security

package
v0.0.0-...-d869020 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseLittlePassword

func ParseLittlePassword(passwordString string) (*password, error)

ParseLittlePassword 解析采用base64编码的字符串获取密码

func RandLittlePassword

func RandLittlePassword() string

RandLittlePassword 产生 256个byte随机组合的 密码,最后会使用base64编码为字符串存储在配置文件中 不能出现任何一个重复的byte位,必须又 0-255 组成,并且都需要包含

Types

type AESCipher

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

AESCipher one of Encryptor implement

func NewAESCipher

func NewAESCipher(key string) *AESCipher

NewAESCipher return a AESCipher

func (*AESCipher) Decode

func (cipher *AESCipher) Decode(src []byte) []byte

Decode src

func (*AESCipher) Encode

func (cipher *AESCipher) Encode(src []byte) []byte

Encode src

Jump to

Keyboard shortcuts

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