package
0.0.0-20191113032148-3606b63ab30f
Repository: https://github.com/phenixchain/devchain.git
Documentation: pkg.go.dev
# README
crypto
功能
- 支持 ed25519, secp256k1, sm2
- 统一的 PrivKey,Pubkey, Signature 接口, 详见
crypto.go
依赖
- sm2 编译依赖 gmssl 2.0 版本
- 安装:
bash ./deps/install_gmssl.sh
# Packages
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
# Functions
CRandBytes This uses the OS and the Seed(s).
CRandHex RandHex(24) gives 96 bits of randomness, strong enough for most purposes.
CReader Returns a crand.Reader mixed with user-supplied entropy.
GetName 获取name.
GetType 获取type.
MixEntropy Mix additional bytes of randomness, e.g.
New new.
Register 注册.
RegisterType 注册类型.
Ripemd160 加密算法.
Sha256 加密算法.
Sm3Hash 加密算法.
# Structs
CertSignature 签名.