little

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePassword

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

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

func RandPassword

func RandPassword() string

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

Types

type LittleCipher

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

func NewCipher

func NewCipher(encodePassword *password) *LittleCipher

新建一个编码解码器

func (*LittleCipher) Decode

func (cipher *LittleCipher) Decode(bs []byte) []byte

解码加密后的数据到原数据

func (*LittleCipher) Encode

func (cipher *LittleCipher) Encode(bs []byte) []byte

加密原数据

Jump to

Keyboard shortcuts

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