package
0.0.0-20190722071344-ea1d8b2dbe68
Repository: https://github.com/arxanchain/sdk-go-common.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
boolToPtr returns the pointer to a boolean.
CalculateBCHash returns the Bitcoin hash (double sha256) of the given transaction.
CleanEnvVar replaces all occurrences of illegal characters in an environment variable with the specified byte.
ComputeBitcoinAddress compute address from public key Key hash = RIPEMD-160(SHA-256(public key)) Checksum = SHA-256(SHA-256(Key hash)) first 4 bytes Bitcoin Address = Base58Encode(Key hash + Checksum).
ComputeCryptoHash should be used in openchain code so that we can change the actual algo used for crypto-hash at one place.
No description provided by the author
No description provided by the author
CopyFile copies a file from src to dst.
No description provided by the author
No description provided by the author
Helpers for copying generic structures.
No description provided by the author
No description provided by the author
CreateUtcTimestamp returns a google/protobuf/Timestamp in UTC.
CreateUtcToday return current utc date, format is: "%d-%02d-%02d".
DecodeBase58 decodes from Base58.
DecodeBase64 decodes from Base64.
Decrypt from base64 to decrypted string.
EncodeBase58 encodes to Base58.
EncodeBase64 encodes to Base64.
Encrypt string to base64 crypto using AES.
EncryptPassword encrypt password and return hash result you can not decrypt this password any more.
FindMissingElements identifies the elements of the first slice that are not present in the second The second slice is expected to be a subset of the first slice.
GenerateBytesUUID returns a UUID based on RFC 4122 returning the generated bytes.
GenerateHashFromSignature returns a hash of the combined parameters.
GenerateIDWithAlg generates an ID using a custom algorithm.
GenerateIntUUID returns a UUID based on RFC 4122 returning a big.Int.
GenerateShortID generates a short id (length = 9).
GenerateUUID returns a UUID based on RFC 4122.
GenerateUUIDfromTxSHAHash generates SHA256 hash using Tx payload, and uses its first 128 bits as a UUID.
GetFQDN Fully Qualified Domain Name returns "unknown" or hostanme in case of error.
i=1, lenght=2 -> result=01 i=10, lenght=2 -> result=10 i=1, lenght=3 -> result=001.
IntArrayEquals checks if the arrays of ints are the same.
IntToPtr returns the pointer to an int.
Check if the data is valid SHA1, MD5 or SHA256 string.
IsUUID returns true if the given string is a valid UUID.
MapStringStringSliceValueSet returns the set of values in a map[string][]string.
No description provided by the author
No description provided by the author
No description provided by the author
Decrypt from base64 RawURLEncoding to decrypted string.
Encrypt string to base64 RawURLEncoding crypto using AES.
RemoveDuplicate remove duplicates for haystack(isSensitive true for case-sensitive, false for case-insensitive).
No description provided by the author
SliceStringIsSubset returns whether the smaller set of strings is a subset of the larger.
No description provided by the author
No description provided by the author
Has returns true if the needle is in the haystack (case-sensitive).
HasI returns true if the needle is in the haystack (case-insensitive).
StringToPtr returns the pointer to a string.
TimeToPtr returns the pointer to a time stamp.
UintToPtr returns the pointer to an uint.
validate base64 encoding string.
validate txid from blockchain return.
validate UUID base on RFC 4122(uuid v4).
VerifyPassword verify the pass is match with the given hash.
# Structs
No description provided by the author