MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / generateSecretKey

Function generateSecretKey

cpp/core/Crypto.cpp:15–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "Exception.hpp"
14
15void generateSecretKey(std::array<uint8_t, 16>& key) {
16 int ret = getentropy(key.data(), 16);
17 if (ret != 0) {
18 throw SYSCALL_EXCEPTION("getentropy");
19 }
20}
21
22// adapted from the Intel Cryptography Primitives Library
23static inline __m128i aes128_assist(__m128i temp1, __m128i temp2) {

Callers 1

_initDbMethod · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected