manage nonces in crypto.h

This commit is contained in:
2026-04-25 13:06:54 +02:00
parent 0f4d4f96d6
commit 47f1f7dd74
7 changed files with 55 additions and 71 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include "common.h"
#include <array>
#include <botan/secmem.h>
#include <fstream>
#include <optional>
@@ -11,10 +10,8 @@ constexpr u64 AFTER_HEADER_OFFSET = 68;
// !!! REMEMBER TO UPDATE entry_total_size IN Vault::delete_file
struct FileHeader {
std::array<u8, 24> name_nonce;
u64 name_ciphertext_size;
std::string name;
std::array<u8, 24> content_nonce;
u64 content_ciphertext_size;
};