Documentation ¶
Index ¶
- Constants
- func GetDeadlineOfIBS(addr []byte) uint64
- func GetHash(in []byte) []byte
- func GetPublicKey(in []byte) []byte
- func NewChildPrivateKeyOfIBS(privK []byte, t uint64) (cPriKey []byte, signPre []byte)
- func NewPrivateKey() []byte
- func PublicKeyToAddress(in []byte, addrType uint8) []byte
- func Recover(address, sign, msg []byte) bool
- func SaveWallet(file, passwd string, addr, privKey, prefix []byte) error
- func Sign(privK, msg []byte) []byte
- type EcdsaKey
- type TWallet
Constants ¶
View Source
const ( // EAddrTypeDefault the type of default public address EAddrTypeDefault = byte(iota + 1) // EAddrTypeIBS identity-based signature 基于身份的签名,不同时间,使用不同私钥签名(签名时间是消息的前8个字节) EAddrTypeIBS )
View Source
const ( // AddressLength address length AddressLength = 24 // SignLen default length of sign SignLen = 65 // TimeDuration EAddrTypeIBS的子私钥有效时间,一个月 TimeDuration = 31558150000 / 12 )
Variables ¶
This section is empty.
Functions ¶
func GetDeadlineOfIBS ¶
GetDeadlineOfIBS get deadline of child key by public address
func NewChildPrivateKeyOfIBS ¶
NewChildPrivateKeyOfIBS create child key of the address,time(ms)
func PublicKeyToAddress ¶
PublicKeyToAddress 将公钥转成钱包地址
func SaveWallet ¶
SaveWallet 将私钥信息和地址保存到文件中
Types ¶
Click to show internal directories.
Click to hide internal directories.