Fix crypto primitives

This commit is contained in:
Christoph Hagen 2024-02-09 20:50:17 +01:00
parent aa6cc17154
commit 2a6db822ff

View File

@ -7,37 +7,37 @@
/** /**
* @brief A private key for asymmetric cryptography * @brief A private key for asymmetric cryptography
*/ */
typedef struct { struct PrivateKey {
/// @brief The size of a private key /// @brief The size of a private key
static const int size = 32; static const int size = 32;
uint8_t bytes[size]; uint8_t bytes[size];
} PrivateKey; };
/** /**
* @brief A public key for asymmetric cryptography * @brief A public key for asymmetric cryptography
*/ */
typedef struct { struct PublicKey {
/// @brief The size of a public key /// @brief The size of a public key
static const int size = 32; static const int size = 32;
uint8_t bytes[size]; uint8_t bytes[size];
} PublicKey; };
/** /**
* @brief A signature of some data using a private key * @brief A signature of some data using a private key
*/ */
typedef struct { struct Signature {
/// @brief The size of a message signature /// @brief The size of a message signature
static const int size = 64; static const int size = 64;
uint8_t bytes[size]; uint8_t bytes[size];
} Signature; };
#pragma pack(pop) #pragma pack(pop)