Documentation ¶
Overview ¶
Package keytool
@author: xwc1125
Package keytool ¶
Package keytool
Index ¶
- Constants
- func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptCBCFromBase64(encrypted string, key string) (decrypted string)
- func AesDecryptCFB(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptCFBFromBase64(encrypted string, key string) (decrypted string)
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptECBFromBase64(encrypted string, key string) (decrypted string)
- func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptCBCToBase64(origData string, key string) (encrypted string)
- func AesEncryptCFB(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptCFBToBase64(origData string, key string) (encrypted string)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptECBToBase64(origData string, key string) (encrypted string)
- func Decrypt(sssType string, shares string, encoding, pwd string) ([]byte, error)
- func Encrypt(parts, threshold int, sssType string, secret string, isSecretHex bool, ...) ([]byte, error)
Constants ¶
View Source
const ( // EncodingHEX ... EncodingHEX = "hex" // EncodingBASE64 ... EncodingBASE64 = "base64" // EncodingAES ... EncodingAES = "aes" // SssTypeGalois ... SssTypeGalois = "galois" // SssTypeGf256 ... SssTypeGf256 = "gf256" )
Variables ¶
This section is empty.
Functions ¶
func AesDecryptCBC ¶
func AesDecryptCBCFromBase64 ¶
func AesDecryptCFB ¶
func AesDecryptCFBFromBase64 ¶
func AesDecryptECB ¶
func AesDecryptECBFromBase64 ¶
func AesEncryptCBC ¶
func AesEncryptCBCToBase64 ¶
func AesEncryptCFB ¶
func AesEncryptCFBToBase64 ¶
=================== CFB ======================
func AesEncryptECB ¶
func AesEncryptECBToBase64 ¶
=================== ECB ======================
func Decrypt ¶
Decrypt 恢复私钥 sssType:shamir的方式(galois,gf256) shares:需要恢复私钥的密码片集,密钥片之间用”,“分割 encoding:Encrypt时输出的结果类型(hex,base64,aes) pwd:当encoding=aes时,使用pwd进行加密返回结果
func Encrypt ¶
func Encrypt(parts, threshold int, sssType string, secret string, isSecretHex bool, encoding, pwd string) ([]byte, error)
Encrypt 分片
parts:私钥总分片数量 threshold:门限数 sssType:shamir的方式(galois,gf256) secret:需要分片的私钥 isSecretHex:私钥是否时16进制 encoding:Encrypt时输出的结果类型(hex,base64,aes) pwd:当encoding=aes时,使用pwd进行加密返回结果
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.