Skip to content

sgns::crypto

Classes

Name
class sgns::crypto::Hasher
class sgns::crypto::HasherImpl

Types

Name
using Blob< 16 > Hash128
using Blob< 32 > Hash256
using Blob< 8 > Hash64

Functions

Name
base::Hash256 sha256(std::string_view input)
base::Hash256 sha256(gsl::span< const uint8_t > input)
std::vector< uint8_t > sha256(const void * data, size_t dataSize)
void make_twox64(const uint8_t * in, uint32_t len, uint8_t * out)
base::Hash64 make_twox64(gsl::span< const uint8_t > buf)
void make_twox128(const uint8_t * in, uint32_t len, uint8_t * out)
base::Hash128 make_twox128(gsl::span< const uint8_t > buf)
void make_twox256(const uint8_t * in, uint32_t len, uint8_t * out)
base::Hash256 make_twox256(gsl::span< const uint8_t > buf)

Types Documentation

using Hash128

using sgns::base::Hash128 = Blob<16>;

using Hash256

using sgns::base::Hash256 = Blob<32>;

using Hash64

using sgns::base::Hash64 = Blob<8>;

Functions Documentation

function sha256

base::Hash256 sha256(
    std::string_view input
)

Parameters:

  • input to be hashed

Return: hashed bytes

Take a SHA-256 hash from string

function sha256

base::Hash256 sha256(
    gsl::span< const uint8_t > input
)

Parameters:

  • input to be hashed

Return: hashed bytes

Take a SHA-256 hash from bytes

function sha256

std::vector< uint8_t > sha256(
    const void * data,
    size_t dataSize
)

function make_twox64

void make_twox64(
    const uint8_t * in,
    uint32_t len,
    uint8_t * out
)

function make_twox64

base::Hash64 make_twox64(
    gsl::span< const uint8_t > buf
)

function make_twox128

void make_twox128(
    const uint8_t * in,
    uint32_t len,
    uint8_t * out
)

function make_twox128

base::Hash128 make_twox128(
    gsl::span< const uint8_t > buf
)

function make_twox256

void make_twox256(
    const uint8_t * in,
    uint32_t len,
    uint8_t * out
)

function make_twox256

base::Hash256 make_twox256(
    gsl::span< const uint8_t > buf
)

Updated on 2026-06-05 at 17:22:18 -0700