Extract CryptoNote crypto sources from upstream (fa1608cf). Build as static libcryptonote.a via CMake with compat stubs for external dependencies (warnings, logging, varint, profiling). 37 upstream files, 10 compat stubs, 680KB static library. Co-Authored-By: Charon <charon@lethean.io>
17 lines
397 B
C++
17 lines
397 B
C++
// SPDX-Licence-Identifier: EUPL-1.2
|
|
// Thin C wrappers around CryptoNote C++ crypto library.
|
|
// This is the implementation of bridge.h.
|
|
|
|
#include "bridge.h"
|
|
|
|
#include <cstring>
|
|
#include "crypto.h"
|
|
#include "hash-ops.h"
|
|
|
|
extern "C" {
|
|
|
|
void bridge_fast_hash(const uint8_t *data, size_t len, uint8_t hash[32]) {
|
|
crypto::cn_fast_hash(data, len, reinterpret_cast<char*>(hash));
|
|
}
|
|
|
|
} // extern "C"
|