Documentation ¶
Index ¶
- Variables
- func DecodePrivKey(base58PrivKey string, pwdBytes []byte) (*framework.PrivKey, error)
- func DecodePrivKeyWithRawPwd(base58PrivKey string, pwd string) (*framework.PrivKey, error)
- func DecodePubKey(base58PubKey string) (*framework.PubKey, error)
- func DecryptPrivKey(encPrivKey []byte, pwdBytes []byte) ([]byte, error)
- func EncodePrivKey(privKey *framework.PrivKey, pwdBytes []byte) (string, error)
- func EncodePrivKeyWithRawPwd(privKey *framework.PrivKey, pwd string) (string, error)
- func EncodePubKey(pubKey *framework.PubKey) string
- func EncryptPrivKey(privKey *framework.PrivKey, pwdBytes []byte) ([]byte, error)
- func GetAlgorithmByCode(code int16) framework.CryptoAlgorithm
- func GetAlgorithmByName(name string) framework.CryptoAlgorithm
- func GetAsymmetricEncryptionFunction(algorithm framework.CryptoAlgorithm) framework.AsymmetricEncryptionFunction
- func GetAsymmetricEncryptionFunctionByCode(code int16) framework.AsymmetricEncryptionFunction
- func GetAsymmetricEncryptionFunctionByName(name string) framework.AsymmetricEncryptionFunction
- func GetCryptoFunction(algorithm framework.CryptoAlgorithm) framework.CryptoFunction
- func GetCryptoFunctionByCode(code int16) framework.CryptoFunction
- func GetCryptoFunctionByName(name string) framework.CryptoFunction
- func GetHashFunction(algorithm framework.CryptoAlgorithm) framework.HashFunction
- func GetHashFunctionByCode(code int16) framework.HashFunction
- func GetHashFunctionByName(name string) framework.HashFunction
- func GetRandomFunction(algorithm framework.CryptoAlgorithm) framework.RandomFunction
- func GetRandomFunctionByCode(code int16) framework.RandomFunction
- func GetRandomFunctionByName(name string) framework.RandomFunction
- func GetSignatureFunction(algorithm framework.CryptoAlgorithm) framework.SignatureFunction
- func GetSignatureFunctionByCode(code int16) framework.SignatureFunction
- func GetSignatureFunctionByName(name string) framework.SignatureFunction
- func GetSymmetricEncryptionFunction(algorithm framework.CryptoAlgorithm) framework.SymmetricEncryptionFunction
- func GetSymmetricEncryptionFunctionByCode(code int16) framework.SymmetricEncryptionFunction
- func GetSymmetricEncryptionFunctionByName(name string) framework.SymmetricEncryptionFunction
- func MustDecodePrivKey(base58PrivKey string, pwdBytes []byte) *framework.PrivKey
- func MustDecodePubKey(base58PubKey string) *framework.PubKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PubKeyFileMagicNum = []byte{255, 112, 117, 98} PrivKeyFileMagicNum = []byte{0, 112, 114, 118} )
Functions ¶
func DecodePrivKey ¶
func DecodePrivKeyWithRawPwd ¶
func EncodePrivKey ¶
func EncodePrivKeyWithRawPwd ¶
func EncodePubKey ¶
func EncryptPrivKey ¶
func GetAlgorithmByName ¶
func GetAlgorithmByName(name string) framework.CryptoAlgorithm
func GetAsymmetricEncryptionFunction ¶
func GetAsymmetricEncryptionFunction(algorithm framework.CryptoAlgorithm) framework.AsymmetricEncryptionFunction
func GetAsymmetricEncryptionFunctionByCode ¶
func GetAsymmetricEncryptionFunctionByCode(code int16) framework.AsymmetricEncryptionFunction
非对称加密算法实现
func GetAsymmetricEncryptionFunctionByName ¶
func GetAsymmetricEncryptionFunctionByName(name string) framework.AsymmetricEncryptionFunction
func GetCryptoFunction ¶
func GetCryptoFunction(algorithm framework.CryptoAlgorithm) framework.CryptoFunction
func GetCryptoFunctionByCode ¶
func GetCryptoFunctionByCode(code int16) framework.CryptoFunction
密码算法实现
func GetCryptoFunctionByName ¶
func GetCryptoFunctionByName(name string) framework.CryptoFunction
func GetHashFunction ¶
func GetHashFunction(algorithm framework.CryptoAlgorithm) framework.HashFunction
func GetHashFunctionByName ¶
func GetHashFunctionByName(name string) framework.HashFunction
func GetRandomFunction ¶
func GetRandomFunction(algorithm framework.CryptoAlgorithm) framework.RandomFunction
func GetRandomFunctionByCode ¶
func GetRandomFunctionByCode(code int16) framework.RandomFunction
随机算法实现
func GetRandomFunctionByName ¶
func GetRandomFunctionByName(name string) framework.RandomFunction
func GetSignatureFunction ¶
func GetSignatureFunction(algorithm framework.CryptoAlgorithm) framework.SignatureFunction
func GetSignatureFunctionByCode ¶
func GetSignatureFunctionByCode(code int16) framework.SignatureFunction
签名算法实现
func GetSignatureFunctionByName ¶
func GetSignatureFunctionByName(name string) framework.SignatureFunction
func GetSymmetricEncryptionFunction ¶
func GetSymmetricEncryptionFunction(algorithm framework.CryptoAlgorithm) framework.SymmetricEncryptionFunction
func GetSymmetricEncryptionFunctionByCode ¶
func GetSymmetricEncryptionFunctionByCode(code int16) framework.SymmetricEncryptionFunction
对称加密算法
func GetSymmetricEncryptionFunctionByName ¶
func GetSymmetricEncryptionFunctionByName(name string) framework.SymmetricEncryptionFunction
func MustDecodePrivKey ¶ added in v1.3.3
func MustDecodePubKey ¶ added in v1.3.3
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.