[][src]Module wedpr_crypto::utils

Common utility functions.

Functions

bytes_to_string

Converts bytes to an encoded string.

bytes_to_utf8

Converts bytes to a UTF8 string.

get_random_scalar

Gets a random Scalar.

hash_to_scalar

Converts an arbitrary string to Scalar. It will hash it first, and transform the numeric value of hash output to Scalar.

make_commitment_point

Makes a commitment for value in point format.

point_to_string

Converts RistrettoPoint to an encoded string.

rangeproof_to_string

Converts RangeProof to an encoded string.

scalar_to_string

Converts Scalar to an encoded string.

string_to_bytes

Converts an encoded string to a bytes vector.

string_to_point

Converts an encoded string to RistrettoPoint.

string_to_scalar

Converts an encoded string to Scalar.

utf8_to_bytes

Converts a UTF8 string to a bytes vector.