Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretKey ¶ added in v0.1.4
type SecretKey struct {
// contains filtered or unexported fields
}
func New ¶
==============================
初始化 extraItem: 额外信息的位置,从0开始 cryptKey: 密码本 key: 密钥 返回值1: SecretKey对象 返回值2: 错误信息
==============================
initialization extraItem: extra information position, start from 0 key: key cryptKey: password book return value 1: SecretKey object return value 2: error message
func NewJson ¶
==============================
初始化(Json格式)
key: 密码本
格式:
{
"extraItem": 1,
"key": ["asfa908#@%.,?", "bcdeftuvwxyz0123456789"]
}
返回值1: SecretKey对象
返回值2: 错误信息
==============================
initialization(Json format)
key: password book
format:
{
"extraItem": 1,
"key": ["asfa908#@%.,?", "bcdeftuvwxyz0123456789"]
}
return value 1: SecretKey object
return value 2: error message
func (*SecretKey) Decrypt ¶ added in v0.1.4
==============================
解密 str: 需要解密的字符串 返回值1: 解密后的字符串 返回值2: 额外信息 返回值3: 错误信息
==============================
decrypt str: string need to decrypt return value 1: decrypted string return value 2: extra information return value 3: error message
func (*SecretKey) Encrypt ¶ added in v0.1.4
==============================
加密 extra: 额外信息,暂只支持一个字符 str: 需要加密的字符串 返回值1: 加密后的字符串 返回值2: 错误信息
==============================
encryption extra: extra information, only support one character str: string need to encrypt return value 1: encrypted string return value 2: error message
Click to show internal directories.
Click to hide internal directories.