Fix build for g++

This commit is contained in:
ayy lmao
2022-07-06 18:19:23 +03:00
committed by lilmayofuksu
parent 850b282b70
commit 487b36a37e
3 changed files with 11 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ fn main() {
.include("mhycrypto")
.cpp(true)
.file("mhycrypto/aes.c")
.file("mhycrypto/aes.cpp")
.file("mhycrypto/memecrypto.cpp")
.file("mhycrypto/metadata.cpp")
.file("mhycrypto/metadatastringdec.cpp")

View File

@@ -5,8 +5,11 @@
// http://en.wikipedia.org/wiki/Rijndael_key_schedule
// http://en.wikipedia.org/wiki/Rijndael_mix_columns
// http://en.wikipedia.org/wiki/Rijndael_S-box
// This code is public domain, or any OSI-approved license, your choice. No warranty.
extern "C" {
#include <assert.h>
#include <stdio.h>
#include <string.h>
@@ -383,3 +386,5 @@ void oqs_mhy128_dec_c(const uint8_t *ciphertext, const void *_schedule, uint8_t
// Reverse the first Round
xor_round_key(plaintext, schedule, 0);
}
}

View File

@@ -6,6 +6,8 @@
#ifndef __OQS_AES_H
#define __OQS_AES_H
extern "C" {
#include <stdint.h>
#include <stdlib.h>
@@ -63,4 +65,6 @@ void OQS_AES128_ECB_enc_sch(const uint8_t *plaintext, const size_t plaintext_len
*/
void OQS_AES128_ECB_dec_sch(const uint8_t *ciphertext, const size_t ciphertext_len, const void *schedule, uint8_t *plaintext);
}
#endif