mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Fix build for g++
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user