Documentation
¶
Index ¶
- Variables
- func CalcFileSHA256(f *os.File) (string, error)
- func CalcPathSHA256(fpath string) (string, error)
- func CalcSHA256(data []byte) (string, error)
- func DecodePublicKeyOfCessAccount(address string) ([]byte, error)
- func DecodePublicKeyOfSubstrateAccount(address string) ([]byte, error)
- func EncodePublicKeyAsCessAccount(publicKey []byte) (string, error)
- func EncodePublicKeyAsSubstrateAccount(publicKey []byte) (string, error)
- func GetGuid() (string, error)
- func GetRandomcode(length uint8) string
- func InterfaceIsNIL(i interface{}) bool
- func IsIPv4(ipAddr string) bool
- func IsIPv6(ipAddr string) bool
- func PubBytesToString(b []byte) string
- func RandSlice(slice interface{})
- func RandStr(n int) string
- func RandomInRange(min, max int) int
- func RecoverError(err interface{}) error
- func VerityAddress(address string, prefix []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SSPrefix = []byte{0x53, 0x53, 0x35, 0x38, 0x50, 0x52, 0x45} SubstratePrefix = []byte{0x2a} CessPrefix = []byte{0x50, 0xac} )
Functions ¶
func CalcFileSHA256 ¶
CalcFileSHA256 is used to calculate the sha256 value of the file type.
func CalcPathSHA256 ¶
CalcPathSHA256 is used to calculate the sha256 value of a file with a given path.
func CalcSHA256 ¶
CalcSHA256 is used to calculate the sha256 value of the data.
func InterfaceIsNIL ¶
func InterfaceIsNIL(i interface{}) bool
InterfaceIsNIL returns the comparison between i and nil
func PubBytesToString ¶
func RandSlice ¶
func RandSlice(slice interface{})
RandSlice is used to disrupt the order of elements in the slice
func RecoverError ¶
func RecoverError(err interface{}) error
RecoverError is used to record the stack information of panic
func VerityAddress ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.