mirror of https://github.com/AxioDL/nod.git
OS X build fixes
This commit is contained in:
parent
960ba8e462
commit
ceb4d3bb9b
|
@ -1,5 +1,7 @@
|
||||||
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(NODLib)
|
project(NODLib)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
2
LogVisor
2
LogVisor
|
@ -1 +1 @@
|
||||||
Subproject commit 317e75c22e31746947bd1b3700cd72d53c97c837
|
Subproject commit 7be764c387951cabfc86d52f48bd3dab54127aeb
|
|
@ -12,8 +12,8 @@ class IAES
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~IAES() {}
|
virtual ~IAES() {}
|
||||||
virtual void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)=0;
|
virtual void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len)=0;
|
||||||
virtual void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)=0;
|
virtual void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len)=0;
|
||||||
virtual void setKey(const uint8_t* key)=0;
|
virtual void setKey(const uint8_t* key)=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "NOD/DiscBase.hpp"
|
#include "NOD/DiscBase.hpp"
|
||||||
#include "NOD/IFileIO.hpp"
|
#include "NOD/IFileIO.hpp"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
10
lib/aes.cpp
10
lib/aes.cpp
|
@ -185,8 +185,8 @@ protected:
|
||||||
void _decrypt(uint8_t* buff);
|
void _decrypt(uint8_t* buff);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len);
|
void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len);
|
||||||
void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len);
|
void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len);
|
||||||
void setKey(const uint8_t* key);
|
void setKey(const uint8_t* key);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ void SoftwareAES::decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outb
|
||||||
}
|
}
|
||||||
|
|
||||||
// CBC mode encryption
|
// CBC mode encryption
|
||||||
void SoftwareAES::encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)
|
void SoftwareAES::encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len)
|
||||||
{
|
{
|
||||||
uint8_t block[16];
|
uint8_t block[16];
|
||||||
uint8_t feedback[16];
|
uint8_t feedback[16];
|
||||||
|
@ -477,7 +477,7 @@ class NiAES : public IAES
|
||||||
__m128i m_ekey[11];
|
__m128i m_ekey[11];
|
||||||
__m128i m_dkey[11];
|
__m128i m_dkey[11];
|
||||||
public:
|
public:
|
||||||
void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)
|
void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len)
|
||||||
{
|
{
|
||||||
__m128i feedback,data;
|
__m128i feedback,data;
|
||||||
uint64_t i,j;
|
uint64_t i,j;
|
||||||
|
@ -497,7 +497,7 @@ public:
|
||||||
_mm_storeu_si128(&((__m128i*)outbuf)[i], feedback);
|
_mm_storeu_si128(&((__m128i*)outbuf)[i], feedback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)
|
void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len)
|
||||||
{
|
{
|
||||||
__m128i data,feedback,last_in;
|
__m128i data,feedback,last_in;
|
||||||
uint64_t i,j;
|
uint64_t i,j;
|
||||||
|
|
Loading…
Reference in New Issue