package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# 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

AddPKCSPadding Adds padding to a block of data.
AesCTRXOR is an AES cipher following https://leanpub.com/gocrypto/read#leanpub-auto-aes-cbc .
DeriveKeyFromPassword derives a key from password using the provided KDParams params.
GenerateKeyPair generates a private and public key pair.
GetRandomBytes returns n random bytes.
GetRandomBytesToBuffer puts n random bytes using go crypto.rand into provided buff slice.
GetRandomUInt32 returns a uint32 in the range [0 - max).
Keccak256 calculates and returns the Keccak256 hash of the input data.
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
MinInt returns x if x < y and y otherwise.
MinInt32 returns x if x < y and y otherwise.
MinInt64 returns x if x < y and y otherwise.
NewPrivateKey creates a new private key from data.
NewPrivateKeyFromString creates a new private key a base58 encoded string.
NewPublicKey creates a new public key from provided binary key data.
NewPublicKeyFromString creates a new public key from a base58 encoded string data.
NewUUID returns a new random type-4 UUID raw bytes.
Pkcs7Pad returns input with padding using the pkcs7 padding spec.
Pkcs7Unpad returned in without padded data using pkcs7 padding spec.
RemovePKCSPadding Removes padding from data that was added using AddPKCSPadding.
Sha256 is a SHA-3-256 (not sha-256) hasher.
UUIDString returns a new random type-4 UUID string.

# Variables

DefaultCypherParams used for key derivation by the app.

# Structs

KDParams defines key derivation scheme params.

# Interfaces

Key defines basic key caps.
PrivateKey defines a private encryption key.
PublicKey defines a public encryption key.

# Type aliases

UUID is a 16-len byte array represnting a UUID.