Refactor Crypto/Utils lib to make it Linux compatible

This commit is contained in:
Jan 2021-03-01 08:17:18 -08:00
parent 22402766af
commit b6b0a57232
6 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,7 @@
#pragma once
#include <cstddef>
#include "IHashFunction.h"
#include "IStreamCipher.h"
#include "IPublicKeyAlgorithm.h"

View File

@ -1,5 +1,7 @@
#pragma once
#include <cstddef>
class IHashFunction
{
public:

View File

@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
#include <cstddef>
class IPublicKeyAlgorithm
{

View File

@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
#include <cstddef>
class IStreamCipher
{

View File

@ -1,7 +1,7 @@
#include "AlgorithmSalsa20.h"
#include "salsa20.h"
#include <cassert>
#include <exception>
#include <stdexcept>
class AlgorithmSalsa20::AlgorithmSalsa20Impl
{
@ -27,7 +27,7 @@ public:
if(ivSize != 8)
{
throw std::exception("Salsa20 IV size must be 8");
throw std::invalid_argument("Salsa20 IV size must be 8");
}
Salsa20_IVSetup(&m_context, iv);

View File

@ -1,5 +1,4 @@
#include "CommandLineOption.h"
#include <Windows.h>
CommandLineOption::CommandLineOption()
{