Skip to content

Commit 2bb3114

Browse files
committed
Fixed AES not accepting any keys, separated crypto class for reuse.
Added "testing" project (allowed me to debug issues with the crypto stuff). Removed dependencies on the lua.hpp header. Less magic numbers on AES class. Bumped major version because of incompatible changes to the GenerateSecondaryKey function arguments. NOTICE: Random generation of elliptical curve points is not implemented yet on CryptoPP!
1 parent f454942 commit 2bb3114

File tree

12 files changed

+1293
-1094
lines changed

12 files changed

+1293
-1094
lines changed

projects/premake5.lua

+48-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,25 @@ end
1616

1717
include(gmcommon)
1818

19+
local SOURCE_DIRECTORY = "../source"
1920
local CRYPTOPP_DIRECTORY = "../cryptopp"
2021

2122
CreateWorkspace({name = "crypt"})
2223
warnings("Off")
2324

24-
CreateProject({serverside = true})
25+
CreateProject({serverside = true, manual_files = true})
2526
IncludeLuaShared()
2627
defines("CRYPTOPP_ENABLE_NAMESPACE_WEAK=1")
28+
includedirs({
29+
SOURCE_DIRECTORY .. "/common",
30+
SOURCE_DIRECTORY .. "/module"
31+
})
32+
files({
33+
SOURCE_DIRECTORY .. "/common/*.hpp",
34+
SOURCE_DIRECTORY .. "/common/*.cpp",
35+
SOURCE_DIRECTORY .. "/module/*.hpp",
36+
SOURCE_DIRECTORY .. "/module/*.cpp"
37+
})
2738

2839
filter({"system:windows", "options:not compile-cryptopp"})
2940
includedirs(CRYPTOPP_DIRECTORY .. "/include")
@@ -37,9 +48,19 @@ CreateWorkspace({name = "crypt"})
3748
includedirs(CRYPTOPP_DIRECTORY .. "/include")
3849
links("cryptopp")
3950

40-
CreateProject({serverside = false})
51+
CreateProject({serverside = false, manual_files = true})
4152
IncludeLuaShared()
4253
defines("CRYPTOPP_ENABLE_NAMESPACE_WEAK=1")
54+
includedirs({
55+
SOURCE_DIRECTORY .. "/common",
56+
SOURCE_DIRECTORY .. "/module"
57+
})
58+
files({
59+
SOURCE_DIRECTORY .. "/common/*.hpp",
60+
SOURCE_DIRECTORY .. "/common/*.cpp",
61+
SOURCE_DIRECTORY .. "/module/*.hpp",
62+
SOURCE_DIRECTORY .. "/module/*.cpp"
63+
})
4364

4465
filter({"system:windows", "options:not compile-cryptopp"})
4566
includedirs(CRYPTOPP_DIRECTORY .. "/include")
@@ -72,3 +93,28 @@ CreateWorkspace({name = "crypt"})
7293
filter("configurations:Release")
7394
defines("NDEBUG")
7495
end
96+
97+
project("testing")
98+
kind("ConsoleApp")
99+
includedirs(SOURCE_DIRECTORY .. "/common")
100+
files({
101+
SOURCE_DIRECTORY .. "/common/*.hpp",
102+
SOURCE_DIRECTORY .. "/common/*.cpp",
103+
SOURCE_DIRECTORY .. "/testing/*.cpp"
104+
})
105+
vpaths({
106+
["Header files/*"] = SOURCE_DIRECTORY .. "/*.hpp",
107+
["Source files/*"] = SOURCE_DIRECTORY .. "/*.cpp"
108+
})
109+
110+
filter({"system:windows", "options:not compile-cryptopp"})
111+
includedirs(CRYPTOPP_DIRECTORY .. "/include")
112+
libdirs(CRYPTOPP_DIRECTORY .. "/lib")
113+
links("cryptopp")
114+
115+
filter({"system:linux or macosx", "options:not compile-cryptopp"})
116+
linkoptions("-Wl,-Bstatic,-lcryptopp,-Bdynamic")
117+
118+
filter("options:compile-cryptopp")
119+
includedirs(CRYPTOPP_DIRECTORY .. "/include")
120+
links("cryptopp")

0 commit comments

Comments
 (0)