mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-01-04 10:05:12 -06:00
Also, produce fully static binaries. This means that `gethostname` does not work (doesn't work with static glibc unless you build it with `--enable-static-nss`, which no distro builds glibc with).
16 lines
363 B
C++
16 lines
363 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
|
|
#include "Common.hpp"
|
|
|
|
struct AES128Key {
|
|
ALIGNED(16) uint8_t key[16*11];
|
|
};
|
|
|
|
void generateSecretKey(std::array<uint8_t, 16>& userKey);
|
|
|
|
void expandKey(const std::array<uint8_t, 16>& userKey, AES128Key& key);
|
|
|
|
// generates an AES-128 CBC MAC
|
|
std::array<uint8_t, 8> cbcmac(const AES128Key& key, const uint8_t* data, size_t len); |