@leocuvee/wrkzcoin-multi-hashing 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/.travis.yml +5 -0
  2. package/LICENSE +674 -0
  3. package/README.md +87 -0
  4. package/appveyor.yml +12 -0
  5. package/argon2/.gitattributes +10 -0
  6. package/argon2/.travis.yml +25 -0
  7. package/argon2/Argon2.sln +160 -0
  8. package/argon2/CHANGELOG.md +32 -0
  9. package/argon2/CMakeLists.txt +87 -0
  10. package/argon2/LICENSE +314 -0
  11. package/argon2/Makefile +196 -0
  12. package/argon2/README.md +297 -0
  13. package/argon2/appveyor.yml +40 -0
  14. package/argon2/argon2-specs.pdf +0 -0
  15. package/argon2/export.sh +7 -0
  16. package/argon2/include/argon2.h +427 -0
  17. package/argon2/latex/CMakeLists.txt +34 -0
  18. package/argon2/latex/IEEEtran.cls +6347 -0
  19. package/argon2/latex/Makefile +18 -0
  20. package/argon2/latex/argon2-specs.tex +920 -0
  21. package/argon2/latex/pics/argon2-par.pdf +0 -0
  22. package/argon2/latex/pics/compression.pdf +0 -0
  23. package/argon2/latex/pics/generic.pdf +0 -0
  24. package/argon2/latex/pics/power-distribution.jpg +0 -0
  25. package/argon2/latex/tradeoff.bib +822 -0
  26. package/argon2/libargon2.pc +16 -0
  27. package/argon2/man/CMakeLists.txt +8 -0
  28. package/argon2/man/argon2.1 +57 -0
  29. package/argon2/meson.build +16 -0
  30. package/argon2/meson_options.txt +1 -0
  31. package/argon2/src/CMakeLists.txt +147 -0
  32. package/argon2/src/argon2.c +452 -0
  33. package/argon2/src/argon2.pc.in +11 -0
  34. package/argon2/src/blake2/blake2-impl.h +156 -0
  35. package/argon2/src/blake2/blake2.h +89 -0
  36. package/argon2/src/blake2/blake2b.c +390 -0
  37. package/argon2/src/blake2/blamka-round-opt.h +471 -0
  38. package/argon2/src/blake2/blamka-round-ref.h +56 -0
  39. package/argon2/src/core.c +634 -0
  40. package/argon2/src/core.h +228 -0
  41. package/argon2/src/encoding.c +467 -0
  42. package/argon2/src/encoding.h +57 -0
  43. package/argon2/src/genkat.h +51 -0
  44. package/argon2/src/meson.build +68 -0
  45. package/argon2/src/opt.c +283 -0
  46. package/argon2/src/optimization/CMakeLists.txt +10 -0
  47. package/argon2/src/ref.c +194 -0
  48. package/argon2/src/thread.c +57 -0
  49. package/argon2/src/thread.h +67 -0
  50. package/argon2/tests/CMakeLists.txt +43 -0
  51. package/argon2/tests/bench.c +111 -0
  52. package/argon2/tests/genkat.c +207 -0
  53. package/argon2/tests/kats/argon2d +12304 -0
  54. package/argon2/tests/kats/argon2d.shasum +1 -0
  55. package/argon2/tests/kats/argon2d_v16 +12304 -0
  56. package/argon2/tests/kats/argon2d_v16.shasum +1 -0
  57. package/argon2/tests/kats/argon2i +12304 -0
  58. package/argon2/tests/kats/argon2i.shasum +1 -0
  59. package/argon2/tests/kats/argon2i_v16 +12304 -0
  60. package/argon2/tests/kats/argon2i_v16.shasum +1 -0
  61. package/argon2/tests/kats/argon2id +12304 -0
  62. package/argon2/tests/kats/argon2id.shasum +1 -0
  63. package/argon2/tests/kats/argon2id_v16 +12304 -0
  64. package/argon2/tests/kats/argon2id_v16.shasum +1 -0
  65. package/argon2/tests/kats/check-sums.ps1 +48 -0
  66. package/argon2/tests/kats/check-sums.sh +16 -0
  67. package/argon2/tests/kats/test.ps1 +132 -0
  68. package/argon2/tests/kats/test.sh +117 -0
  69. package/argon2/tests/meson.build +34 -0
  70. package/argon2/tests/test.c +289 -0
  71. package/argon2/tool/CMakeLists.txt +7 -0
  72. package/argon2/tool/main.c +339 -0
  73. package/argon2/tool/meson.build +8 -0
  74. package/argon2/vs2015/Argon2Opt/Argon2Opt.vcxproj +226 -0
  75. package/argon2/vs2015/Argon2Opt/Argon2Opt.vcxproj.filters +69 -0
  76. package/argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj +226 -0
  77. package/argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj.filters +69 -0
  78. package/argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj +225 -0
  79. package/argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj.filters +66 -0
  80. package/argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj +239 -0
  81. package/argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj.filters +72 -0
  82. package/argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj +227 -0
  83. package/argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj.filters +69 -0
  84. package/argon2/vs2015/Argon2Ref/Argon2Ref.vcxproj +226 -0
  85. package/argon2/vs2015/Argon2Ref/Argon2Ref.vcxproj.filters +69 -0
  86. package/argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj +226 -0
  87. package/argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj.filters +69 -0
  88. package/argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj +225 -0
  89. package/argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj.filters +66 -0
  90. package/argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj +227 -0
  91. package/argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj.filters +72 -0
  92. package/argon2/vs2015/Argon2RefTestCI/Argon2RefTestCI.vcxproj +226 -0
  93. package/argon2/vs2015/Argon2RefTestCI/Argon2RefTestCI.vcxproj.filters +69 -0
  94. package/bcrypt.c +566 -0
  95. package/bcrypt.h +14 -0
  96. package/binding.gyp +93 -0
  97. package/blake.c +17 -0
  98. package/blake.h +16 -0
  99. package/boolberry.cc +11 -0
  100. package/boolberry.h +6 -0
  101. package/build/Makefile +354 -0
  102. package/build/Release/.deps/Release/multihashing.node.d +1 -0
  103. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/argon2.o.d +8 -0
  104. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/blake2/blake2b.o.d +8 -0
  105. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/core.o.d +10 -0
  106. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/encoding.o.d +8 -0
  107. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/ref.o.d +14 -0
  108. package/build/Release/.deps/Release/obj.target/multihashing/argon2/src/thread.o.d +5 -0
  109. package/build/Release/.deps/Release/obj.target/multihashing/bcrypt.o.d +4 -0
  110. package/build/Release/.deps/Release/obj.target/multihashing/blake.o.d +7 -0
  111. package/build/Release/.deps/Release/obj.target/multihashing/boolberry.o.d +12 -0
  112. package/build/Release/.deps/Release/obj.target/multihashing/c11.o.d +20 -0
  113. package/build/Release/.deps/Release/obj.target/multihashing/crypto/aesb.o.d +3 -0
  114. package/build/Release/.deps/Release/obj.target/multihashing/crypto/c_blake256.o.d +5 -0
  115. package/build/Release/.deps/Release/obj.target/multihashing/crypto/c_groestl.o.d +10 -0
  116. package/build/Release/.deps/Release/obj.target/multihashing/crypto/c_jh.o.d +9 -0
  117. package/build/Release/.deps/Release/obj.target/multihashing/crypto/c_keccak.o.d +7 -0
  118. package/build/Release/.deps/Release/obj.target/multihashing/crypto/c_skein.o.d +10 -0
  119. package/build/Release/.deps/Release/obj.target/multihashing/crypto/hash.o.d +7 -0
  120. package/build/Release/.deps/Release/obj.target/multihashing/crypto/oaes_lib.o.d +6 -0
  121. package/build/Release/.deps/Release/obj.target/multihashing/crypto/wild_keccak.o.d +8 -0
  122. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight.o.d +18 -0
  123. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_dark.o.d +18 -0
  124. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_dark_lite.o.d +18 -0
  125. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_fast.o.d +18 -0
  126. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_lite.o.d +18 -0
  127. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_soft_shell.o.d +18 -0
  128. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_turtle.o.d +18 -0
  129. package/build/Release/.deps/Release/obj.target/multihashing/cryptonight_turtle_lite.o.d +18 -0
  130. package/build/Release/.deps/Release/obj.target/multihashing/fresh.o.d +10 -0
  131. package/build/Release/.deps/Release/obj.target/multihashing/fugue.o.d +7 -0
  132. package/build/Release/.deps/Release/obj.target/multihashing/groestl.o.d +8 -0
  133. package/build/Release/.deps/Release/obj.target/multihashing/hefty1.o.d +12 -0
  134. package/build/Release/.deps/Release/obj.target/multihashing/keccak.o.d +8 -0
  135. package/build/Release/.deps/Release/obj.target/multihashing/multihashing.o.d +155 -0
  136. package/build/Release/.deps/Release/obj.target/multihashing/nist5.o.d +12 -0
  137. package/build/Release/.deps/Release/obj.target/multihashing/quark.o.d +14 -0
  138. package/build/Release/.deps/Release/obj.target/multihashing/qubit.o.d +12 -0
  139. package/build/Release/.deps/Release/obj.target/multihashing/scryptjane.o.d +30 -0
  140. package/build/Release/.deps/Release/obj.target/multihashing/scryptn.o.d +6 -0
  141. package/build/Release/.deps/Release/obj.target/multihashing/sha1.o.d +24 -0
  142. package/build/Release/.deps/Release/obj.target/multihashing/sha3/aes_helper.o.d +5 -0
  143. package/build/Release/.deps/Release/obj.target/multihashing/sha3/hamsi.o.d +7 -0
  144. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_blake.o.d +6 -0
  145. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_bmw.o.d +6 -0
  146. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_cubehash.o.d +6 -0
  147. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_echo.o.d +7 -0
  148. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_fugue.o.d +6 -0
  149. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_groestl.o.d +6 -0
  150. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_hefty1.o.d +5 -0
  151. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_jh.o.d +6 -0
  152. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_keccak.o.d +6 -0
  153. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_luffa.o.d +6 -0
  154. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_shabal.o.d +6 -0
  155. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_shavite.o.d +7 -0
  156. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_simd.o.d +6 -0
  157. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_skein.o.d +6 -0
  158. package/build/Release/.deps/Release/obj.target/multihashing/sha3/sph_whirlpool.o.d +8 -0
  159. package/build/Release/.deps/Release/obj.target/multihashing/shavite3.o.d +7 -0
  160. package/build/Release/.deps/Release/obj.target/multihashing/skein.o.d +8 -0
  161. package/build/Release/.deps/Release/obj.target/multihashing/x11.o.d +20 -0
  162. package/build/Release/.deps/Release/obj.target/multihashing/x13.o.d +23 -0
  163. package/build/Release/.deps/Release/obj.target/multihashing/x15.o.d +26 -0
  164. package/build/Release/.deps/Release/obj.target/multihashing.node.d +1 -0
  165. package/build/Release/multihashing.node +0 -0
  166. package/build/binding.Makefile +6 -0
  167. package/build/multihashing.target.mk +255 -0
  168. package/c11.c +85 -0
  169. package/c11.h +17 -0
  170. package/crypto/aesb.c +177 -0
  171. package/crypto/c_blake256.c +326 -0
  172. package/crypto/c_blake256.h +43 -0
  173. package/crypto/c_groestl.c +360 -0
  174. package/crypto/c_groestl.h +56 -0
  175. package/crypto/c_jh.c +367 -0
  176. package/crypto/c_jh.h +20 -0
  177. package/crypto/c_keccak.c +112 -0
  178. package/crypto/c_keccak.h +26 -0
  179. package/crypto/c_skein.c +2036 -0
  180. package/crypto/c_skein.h +45 -0
  181. package/crypto/crypto.h +186 -0
  182. package/crypto/cryptonote_core/account.cpp +50 -0
  183. package/crypto/cryptonote_core/account.h +61 -0
  184. package/crypto/cryptonote_core/cryptonote_basic_impl.cpp +186 -0
  185. package/crypto/cryptonote_core/cryptonote_basic_impl.h +65 -0
  186. package/crypto/cryptonote_core/cryptonote_format_utils.cpp +766 -0
  187. package/crypto/cryptonote_core/cryptonote_format_utils.h +30 -0
  188. package/crypto/cryptonote_protocol/cryptonote_protocol_defs.h +152 -0
  189. package/crypto/groestl_tables.h +38 -0
  190. package/crypto/hash-ops.h +57 -0
  191. package/crypto/hash.c +24 -0
  192. package/crypto/hash.h +22 -0
  193. package/crypto/int-util.h +230 -0
  194. package/crypto/oaes_config.h +50 -0
  195. package/crypto/oaes_lib.c +1468 -0
  196. package/crypto/oaes_lib.h +215 -0
  197. package/crypto/skein_port.h +190 -0
  198. package/crypto/variant2_int_sqrt.h +168 -0
  199. package/crypto/wild_keccak.cpp +119 -0
  200. package/crypto/wild_keccak.h +168 -0
  201. package/cryptonight.c +300 -0
  202. package/cryptonight.h +17 -0
  203. package/cryptonight_dark.c +300 -0
  204. package/cryptonight_dark.h +17 -0
  205. package/cryptonight_dark_lite.c +300 -0
  206. package/cryptonight_dark_lite.h +17 -0
  207. package/cryptonight_fast.c +300 -0
  208. package/cryptonight_fast.h +17 -0
  209. package/cryptonight_lite.c +300 -0
  210. package/cryptonight_lite.h +17 -0
  211. package/cryptonight_soft_shell.c +298 -0
  212. package/cryptonight_soft_shell.h +17 -0
  213. package/cryptonight_turtle.c +300 -0
  214. package/cryptonight_turtle.h +17 -0
  215. package/cryptonight_turtle_lite.c +300 -0
  216. package/cryptonight_turtle_lite.h +17 -0
  217. package/fresh.c +42 -0
  218. package/fresh.h +16 -0
  219. package/fugue.c +12 -0
  220. package/fugue.h +16 -0
  221. package/groestl.c +40 -0
  222. package/groestl.h +17 -0
  223. package/hefty1.c +63 -0
  224. package/hefty1.h +16 -0
  225. package/index.js +1 -0
  226. package/keccak.c +14 -0
  227. package/keccak.h +16 -0
  228. package/leocuvee-wrkzcoin-multi-hashing-0.0.20.tgz +0 -0
  229. package/multihashing.cc +699 -0
  230. package/nist5.c +46 -0
  231. package/nist5.h +16 -0
  232. package/package.json +56 -0
  233. package/quark.c +210 -0
  234. package/quark.h +16 -0
  235. package/qubit.c +45 -0
  236. package/qubit.h +16 -0
  237. package/scryptjane/scrypt-jane-chacha.h +132 -0
  238. package/scryptjane/scrypt-jane-hash.h +48 -0
  239. package/scryptjane/scrypt-jane-hash_keccak.h +168 -0
  240. package/scryptjane/scrypt-jane-hash_sha256.h +135 -0
  241. package/scryptjane/scrypt-jane-mix_chacha-avx.h +340 -0
  242. package/scryptjane/scrypt-jane-mix_chacha-sse2.h +371 -0
  243. package/scryptjane/scrypt-jane-mix_chacha-ssse3.h +348 -0
  244. package/scryptjane/scrypt-jane-mix_chacha.h +69 -0
  245. package/scryptjane/scrypt-jane-mix_salsa-avx.h +381 -0
  246. package/scryptjane/scrypt-jane-mix_salsa-sse2.h +443 -0
  247. package/scryptjane/scrypt-jane-mix_salsa.h +70 -0
  248. package/scryptjane/scrypt-jane-pbkdf2.h +112 -0
  249. package/scryptjane/scrypt-jane-portable-x86.h +364 -0
  250. package/scryptjane/scrypt-jane-portable.h +281 -0
  251. package/scryptjane/scrypt-jane-romix-basic.h +67 -0
  252. package/scryptjane/scrypt-jane-romix-template.h +118 -0
  253. package/scryptjane/scrypt-jane-romix.h +27 -0
  254. package/scryptjane/scrypt-jane-salsa.h +106 -0
  255. package/scryptjane/scrypt-jane-test-vectors.h +261 -0
  256. package/scryptjane.c +223 -0
  257. package/scryptjane.h +36 -0
  258. package/scryptn.c +258 -0
  259. package/scryptn.h +16 -0
  260. package/sha1.c +65 -0
  261. package/sha1.h +16 -0
  262. package/sha256.h +440 -0
  263. package/sha3/aes_helper.c +392 -0
  264. package/sha3/hamsi.c +867 -0
  265. package/sha3/hamsi_helper.c +39648 -0
  266. package/sha3/md_helper.c +347 -0
  267. package/sha3/sph_blake.c +1114 -0
  268. package/sha3/sph_blake.h +327 -0
  269. package/sha3/sph_bmw.c +965 -0
  270. package/sha3/sph_bmw.h +328 -0
  271. package/sha3/sph_cubehash.c +723 -0
  272. package/sha3/sph_cubehash.h +292 -0
  273. package/sha3/sph_echo.c +1031 -0
  274. package/sha3/sph_echo.h +320 -0
  275. package/sha3/sph_fugue.c +1208 -0
  276. package/sha3/sph_fugue.h +81 -0
  277. package/sha3/sph_groestl.c +3119 -0
  278. package/sha3/sph_groestl.h +329 -0
  279. package/sha3/sph_hamsi.h +321 -0
  280. package/sha3/sph_hefty1.c +378 -0
  281. package/sha3/sph_hefty1.h +66 -0
  282. package/sha3/sph_jh.c +1116 -0
  283. package/sha3/sph_jh.h +298 -0
  284. package/sha3/sph_keccak.c +1824 -0
  285. package/sha3/sph_keccak.h +293 -0
  286. package/sha3/sph_luffa.c +1426 -0
  287. package/sha3/sph_luffa.h +296 -0
  288. package/sha3/sph_shabal.c +806 -0
  289. package/sha3/sph_shabal.h +344 -0
  290. package/sha3/sph_shavite.c +1764 -0
  291. package/sha3/sph_shavite.h +314 -0
  292. package/sha3/sph_simd.c +1799 -0
  293. package/sha3/sph_simd.h +309 -0
  294. package/sha3/sph_skein.c +1254 -0
  295. package/sha3/sph_skein.h +298 -0
  296. package/sha3/sph_types.h +1976 -0
  297. package/sha3/sph_whirlpool.c +3480 -0
  298. package/sha3/sph_whirlpool.h +209 -0
  299. package/shavite3.c +24 -0
  300. package/shavite3.h +16 -0
  301. package/skein.c +26 -0
  302. package/skein.h +16 -0
  303. package/stdint.h +259 -0
  304. package/tests/argon2-tests.js +16 -0
  305. package/tests/benchmark.js +36 -0
  306. package/tests/cryptonight-tests.js +189 -0
  307. package/tests/cryptonight_monero.js +53 -0
  308. package/tests/test.js +16 -0
  309. package/x11.c +85 -0
  310. package/x11.h +16 -0
  311. package/x13.c +97 -0
  312. package/x13.h +5 -0
  313. package/x15.c +106 -0
  314. package/x15.h +16 -0
@@ -0,0 +1,339 @@
1
+ /*
2
+ * Argon2 reference source code package - reference C implementations
3
+ *
4
+ * Copyright 2015
5
+ * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
6
+ *
7
+ * You may use this work under the terms of a Creative Commons CC0 1.0
8
+ * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
+ * these licenses can be found at:
10
+ *
11
+ * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * You should have received a copy of both of these licenses along with this
15
+ * software. If not, they may be obtained at the above URLs.
16
+ */
17
+
18
+ #define _GNU_SOURCE 1
19
+
20
+ #include <stdint.h>
21
+ #include <stdio.h>
22
+ #include <stdlib.h>
23
+ #include <string.h>
24
+ #include <time.h>
25
+
26
+ #include "argon2.h"
27
+
28
+ /* import private symbol from core.c */
29
+ extern void clear_internal_memory(void *v, size_t n);
30
+
31
+ #define T_COST_DEF 3
32
+ #define LOG_M_COST_DEF 12 /* 2^12 = 4 MiB */
33
+ #define LANES_DEF 1
34
+ #define THREADS_DEF 1
35
+ #define OUTLEN_DEF 32
36
+ #define MAX_PASS_LEN 128
37
+
38
+ #define UNUSED_PARAMETER(x) (void)(x)
39
+
40
+ static void usage(const char *cmd) {
41
+ printf("Usage: %s [-h] salt [-i|-d|-id] [-t iterations] "
42
+ "[-m log2(memory in KiB) | -k memory in KiB] [-p parallelism] "
43
+ "[-l hash length] [-e|-r] [-v (10|13)]\n",
44
+ cmd);
45
+ printf("\tPassword is read from stdin\n");
46
+ printf("Parameters:\n");
47
+ printf("\tsalt\t\tThe salt to use, at least 8 characters\n");
48
+ printf("\t-i\t\tUse Argon2i (this is the default)\n");
49
+ printf("\t-d\t\tUse Argon2d instead of Argon2i\n");
50
+ printf("\t-id\t\tUse Argon2id instead of Argon2i\n");
51
+ printf("\t-t N\t\tSets the number of iterations to N (default = %d)\n",
52
+ T_COST_DEF);
53
+ printf("\t-m N\t\tSets the memory usage of 2^N KiB (default %d)\n",
54
+ LOG_M_COST_DEF);
55
+ printf("\t-k N\t\tSets the memory usage of N KiB (default %d)\n",
56
+ 1 << LOG_M_COST_DEF);
57
+ printf("\t-p N\t\tSets parallelism to N threads (default %d)\n",
58
+ THREADS_DEF);
59
+ printf("\t-l N\t\tSets hash output length to N bytes (default %d)\n",
60
+ OUTLEN_DEF);
61
+ printf("\t-e\t\tOutput only encoded hash\n");
62
+ printf("\t-r\t\tOutput only the raw bytes of the hash\n");
63
+ printf("\t-v (10|13)\tArgon2 version (defaults to the most recent version, currently %x)\n",
64
+ ARGON2_VERSION_NUMBER);
65
+ printf("\t-h\t\tPrint %s usage\n", cmd);
66
+ }
67
+
68
+ static void fatal(const char *error) {
69
+ fprintf(stderr, "Error: %s\n", error);
70
+ exit(1);
71
+ }
72
+
73
+ static void print_hex(uint8_t *bytes, size_t bytes_len) {
74
+ size_t i;
75
+ for (i = 0; i < bytes_len; ++i) {
76
+ printf("%02x", bytes[i]);
77
+ }
78
+ printf("\n");
79
+ }
80
+
81
+ /*
82
+ Runs Argon2 with certain inputs and parameters, inputs not cleared. Prints the
83
+ Base64-encoded hash string
84
+ @out output array with at least 32 bytes allocated
85
+ @pwd NULL-terminated string, presumably from argv[]
86
+ @salt salt array
87
+ @t_cost number of iterations
88
+ @m_cost amount of requested memory in KB
89
+ @lanes amount of requested parallelism
90
+ @threads actual parallelism
91
+ @type Argon2 type we want to run
92
+ @encoded_only display only the encoded hash
93
+ @raw_only display only the hexadecimal of the hash
94
+ @version Argon2 version
95
+ */
96
+ static void run(uint32_t outlen, char *pwd, size_t pwdlen, char *salt, uint32_t t_cost,
97
+ uint32_t m_cost, uint32_t lanes, uint32_t threads,
98
+ argon2_type type, int encoded_only, int raw_only, uint32_t version) {
99
+ clock_t start_time, stop_time;
100
+ size_t saltlen, encodedlen;
101
+ int result;
102
+ unsigned char * out = NULL;
103
+ char * encoded = NULL;
104
+
105
+ start_time = clock();
106
+
107
+ if (!pwd) {
108
+ fatal("password missing");
109
+ }
110
+
111
+ if (!salt) {
112
+ clear_internal_memory(pwd, pwdlen);
113
+ fatal("salt missing");
114
+ }
115
+
116
+ saltlen = strlen(salt);
117
+ if(UINT32_MAX < saltlen) {
118
+ fatal("salt is too long");
119
+ }
120
+
121
+ UNUSED_PARAMETER(lanes);
122
+
123
+ out = malloc(outlen + 1);
124
+ if (!out) {
125
+ clear_internal_memory(pwd, pwdlen);
126
+ fatal("could not allocate memory for output");
127
+ }
128
+
129
+ encodedlen = argon2_encodedlen(t_cost, m_cost, lanes, (uint32_t)saltlen, outlen, type);
130
+ encoded = malloc(encodedlen + 1);
131
+ if (!encoded) {
132
+ clear_internal_memory(pwd, pwdlen);
133
+ fatal("could not allocate memory for hash");
134
+ }
135
+
136
+ result = argon2_hash(t_cost, m_cost, threads, pwd, pwdlen, salt, saltlen,
137
+ out, outlen, encoded, encodedlen, type,
138
+ version);
139
+ if (result != ARGON2_OK)
140
+ fatal(argon2_error_message(result));
141
+
142
+ stop_time = clock();
143
+
144
+ if (encoded_only)
145
+ puts(encoded);
146
+
147
+ if (raw_only)
148
+ print_hex(out, outlen);
149
+
150
+ if (encoded_only || raw_only) {
151
+ free(out);
152
+ free(encoded);
153
+ return;
154
+ }
155
+
156
+ printf("Hash:\t\t");
157
+ print_hex(out, outlen);
158
+ free(out);
159
+
160
+ printf("Encoded:\t%s\n", encoded);
161
+
162
+ printf("%2.3f seconds\n",
163
+ ((double)stop_time - start_time) / (CLOCKS_PER_SEC));
164
+
165
+ result = argon2_verify(encoded, pwd, pwdlen, type);
166
+ if (result != ARGON2_OK)
167
+ fatal(argon2_error_message(result));
168
+ printf("Verification ok\n");
169
+ free(encoded);
170
+ }
171
+
172
+ int main(int argc, char *argv[]) {
173
+ uint32_t outlen = OUTLEN_DEF;
174
+ uint32_t m_cost = 1 << LOG_M_COST_DEF;
175
+ uint32_t t_cost = T_COST_DEF;
176
+ uint32_t lanes = LANES_DEF;
177
+ uint32_t threads = THREADS_DEF;
178
+ argon2_type type = Argon2_i; /* Argon2i is the default type */
179
+ int types_specified = 0;
180
+ int m_cost_specified = 0;
181
+ int encoded_only = 0;
182
+ int raw_only = 0;
183
+ uint32_t version = ARGON2_VERSION_NUMBER;
184
+ int i;
185
+ size_t pwdlen;
186
+ char pwd[MAX_PASS_LEN], *salt;
187
+
188
+ if (argc < 2) {
189
+ usage(argv[0]);
190
+ return ARGON2_MISSING_ARGS;
191
+ } else if (argc >= 2 && strcmp(argv[1], "-h") == 0) {
192
+ usage(argv[0]);
193
+ return 1;
194
+ }
195
+
196
+ /* get password from stdin */
197
+ pwdlen = fread(pwd, 1, sizeof pwd, stdin);
198
+ if(pwdlen < 1) {
199
+ fatal("no password read");
200
+ }
201
+ if(pwdlen == MAX_PASS_LEN) {
202
+ fatal("Provided password longer than supported in command line utility");
203
+ }
204
+
205
+ salt = argv[1];
206
+
207
+ /* parse options */
208
+ for (i = 2; i < argc; i++) {
209
+ const char *a = argv[i];
210
+ unsigned long input = 0;
211
+ if (!strcmp(a, "-h")) {
212
+ usage(argv[0]);
213
+ return 1;
214
+ } else if (!strcmp(a, "-m")) {
215
+ if (m_cost_specified) {
216
+ fatal("-m or -k can only be used once");
217
+ }
218
+ m_cost_specified = 1;
219
+ if (i < argc - 1) {
220
+ i++;
221
+ input = strtoul(argv[i], NULL, 10);
222
+ if (input == 0 || input == ULONG_MAX ||
223
+ input > ARGON2_MAX_MEMORY_BITS) {
224
+ fatal("bad numeric input for -m");
225
+ }
226
+ m_cost = ARGON2_MIN(UINT64_C(1) << input, UINT32_C(0xFFFFFFFF));
227
+ if (m_cost > ARGON2_MAX_MEMORY) {
228
+ fatal("m_cost overflow");
229
+ }
230
+ continue;
231
+ } else {
232
+ fatal("missing -m argument");
233
+ }
234
+ } else if (!strcmp(a, "-k")) {
235
+ if (m_cost_specified) {
236
+ fatal("-m or -k can only be used once");
237
+ }
238
+ m_cost_specified = 1;
239
+ if (i < argc - 1) {
240
+ i++;
241
+ input = strtoul(argv[i], NULL, 10);
242
+ if (input == 0 || input == ULONG_MAX) {
243
+ fatal("bad numeric input for -k");
244
+ }
245
+ m_cost = ARGON2_MIN(input, UINT32_C(0xFFFFFFFF));
246
+ if (m_cost > ARGON2_MAX_MEMORY) {
247
+ fatal("m_cost overflow");
248
+ }
249
+ continue;
250
+ } else {
251
+ fatal("missing -k argument");
252
+ }
253
+ } else if (!strcmp(a, "-t")) {
254
+ if (i < argc - 1) {
255
+ i++;
256
+ input = strtoul(argv[i], NULL, 10);
257
+ if (input == 0 || input == ULONG_MAX ||
258
+ input > ARGON2_MAX_TIME) {
259
+ fatal("bad numeric input for -t");
260
+ }
261
+ t_cost = input;
262
+ continue;
263
+ } else {
264
+ fatal("missing -t argument");
265
+ }
266
+ } else if (!strcmp(a, "-p")) {
267
+ if (i < argc - 1) {
268
+ i++;
269
+ input = strtoul(argv[i], NULL, 10);
270
+ if (input == 0 || input == ULONG_MAX ||
271
+ input > ARGON2_MAX_THREADS || input > ARGON2_MAX_LANES) {
272
+ fatal("bad numeric input for -p");
273
+ }
274
+ threads = input;
275
+ lanes = threads;
276
+ continue;
277
+ } else {
278
+ fatal("missing -p argument");
279
+ }
280
+ } else if (!strcmp(a, "-l")) {
281
+ if (i < argc - 1) {
282
+ i++;
283
+ input = strtoul(argv[i], NULL, 10);
284
+ outlen = input;
285
+ continue;
286
+ } else {
287
+ fatal("missing -l argument");
288
+ }
289
+ } else if (!strcmp(a, "-i")) {
290
+ type = Argon2_i;
291
+ ++types_specified;
292
+ } else if (!strcmp(a, "-d")) {
293
+ type = Argon2_d;
294
+ ++types_specified;
295
+ } else if (!strcmp(a, "-id")) {
296
+ type = Argon2_id;
297
+ ++types_specified;
298
+ } else if (!strcmp(a, "-e")) {
299
+ encoded_only = 1;
300
+ } else if (!strcmp(a, "-r")) {
301
+ raw_only = 1;
302
+ } else if (!strcmp(a, "-v")) {
303
+ if (i < argc - 1) {
304
+ i++;
305
+ if (!strcmp(argv[i], "10")) {
306
+ version = ARGON2_VERSION_10;
307
+ } else if (!strcmp(argv[i], "13")) {
308
+ version = ARGON2_VERSION_13;
309
+ } else {
310
+ fatal("invalid Argon2 version");
311
+ }
312
+ } else {
313
+ fatal("missing -v argument");
314
+ }
315
+ } else {
316
+ fatal("unknown argument");
317
+ }
318
+ }
319
+
320
+ if (types_specified > 1) {
321
+ fatal("cannot specify multiple Argon2 types");
322
+ }
323
+
324
+ if(encoded_only && raw_only)
325
+ fatal("cannot provide both -e and -r");
326
+
327
+ if(!encoded_only && !raw_only) {
328
+ printf("Type:\t\t%s\n", argon2_type2string(type, 1));
329
+ printf("Iterations:\t%u\n", t_cost);
330
+ printf("Memory:\t\t%u KiB\n", m_cost);
331
+ printf("Parallelism:\t%u\n", lanes);
332
+ }
333
+
334
+ run(outlen, pwd, pwdlen, salt, t_cost, m_cost, lanes, threads, type,
335
+ encoded_only, raw_only, version);
336
+
337
+ return ARGON2_OK;
338
+ }
339
+
@@ -0,0 +1,8 @@
1
+ ##################
2
+ # Argon2 utility #
3
+ ##################
4
+
5
+ executable('argon2',
6
+ sources: 'main.c',
7
+ dependencies: argon2_static_dep,
8
+ install: true)
@@ -0,0 +1,226 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup Label="ProjectConfigurations">
4
+ <ProjectConfiguration Include="Debug|Win32">
5
+ <Configuration>Debug</Configuration>
6
+ <Platform>Win32</Platform>
7
+ </ProjectConfiguration>
8
+ <ProjectConfiguration Include="ReleaseStatic|Win32">
9
+ <Configuration>ReleaseStatic</Configuration>
10
+ <Platform>Win32</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="ReleaseStatic|x64">
13
+ <Configuration>ReleaseStatic</Configuration>
14
+ <Platform>x64</Platform>
15
+ </ProjectConfiguration>
16
+ <ProjectConfiguration Include="Release|Win32">
17
+ <Configuration>Release</Configuration>
18
+ <Platform>Win32</Platform>
19
+ </ProjectConfiguration>
20
+ <ProjectConfiguration Include="Debug|x64">
21
+ <Configuration>Debug</Configuration>
22
+ <Platform>x64</Platform>
23
+ </ProjectConfiguration>
24
+ <ProjectConfiguration Include="Release|x64">
25
+ <Configuration>Release</Configuration>
26
+ <Platform>x64</Platform>
27
+ </ProjectConfiguration>
28
+ </ItemGroup>
29
+ <PropertyGroup Label="Globals">
30
+ <ProjectGuid>{CAA75C57-998C-494E-B8A5-5894EF0FC528}</ProjectGuid>
31
+ <RootNamespace>Argon2Opt</RootNamespace>
32
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
33
+ </PropertyGroup>
34
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
35
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
36
+ <ConfigurationType>Application</ConfigurationType>
37
+ <UseDebugLibraries>true</UseDebugLibraries>
38
+ <PlatformToolset>v140</PlatformToolset>
39
+ <CharacterSet>MultiByte</CharacterSet>
40
+ </PropertyGroup>
41
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
42
+ <ConfigurationType>Application</ConfigurationType>
43
+ <UseDebugLibraries>false</UseDebugLibraries>
44
+ <PlatformToolset>v140</PlatformToolset>
45
+ <WholeProgramOptimization>true</WholeProgramOptimization>
46
+ <CharacterSet>MultiByte</CharacterSet>
47
+ </PropertyGroup>
48
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
49
+ <ConfigurationType>Application</ConfigurationType>
50
+ <UseDebugLibraries>false</UseDebugLibraries>
51
+ <PlatformToolset>v140</PlatformToolset>
52
+ <WholeProgramOptimization>true</WholeProgramOptimization>
53
+ <CharacterSet>MultiByte</CharacterSet>
54
+ </PropertyGroup>
55
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
56
+ <ConfigurationType>Application</ConfigurationType>
57
+ <UseDebugLibraries>true</UseDebugLibraries>
58
+ <PlatformToolset>v140</PlatformToolset>
59
+ <CharacterSet>MultiByte</CharacterSet>
60
+ </PropertyGroup>
61
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
62
+ <ConfigurationType>Application</ConfigurationType>
63
+ <UseDebugLibraries>false</UseDebugLibraries>
64
+ <PlatformToolset>v140</PlatformToolset>
65
+ <WholeProgramOptimization>true</WholeProgramOptimization>
66
+ <CharacterSet>MultiByte</CharacterSet>
67
+ </PropertyGroup>
68
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
69
+ <ConfigurationType>Application</ConfigurationType>
70
+ <UseDebugLibraries>false</UseDebugLibraries>
71
+ <PlatformToolset>v140</PlatformToolset>
72
+ <WholeProgramOptimization>true</WholeProgramOptimization>
73
+ <CharacterSet>MultiByte</CharacterSet>
74
+ </PropertyGroup>
75
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
76
+ <ImportGroup Label="ExtensionSettings">
77
+ </ImportGroup>
78
+ <ImportGroup Label="Shared">
79
+ </ImportGroup>
80
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
81
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
82
+ </ImportGroup>
83
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
84
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
85
+ </ImportGroup>
86
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets">
87
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
88
+ </ImportGroup>
89
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
90
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
91
+ </ImportGroup>
92
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
93
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
94
+ </ImportGroup>
95
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
96
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97
+ </ImportGroup>
98
+ <PropertyGroup Label="UserMacros" />
99
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
100
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
101
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
102
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
103
+ </PropertyGroup>
104
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
105
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
106
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
107
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
108
+ </PropertyGroup>
109
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
110
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
111
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
112
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
113
+ </PropertyGroup>
114
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
115
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
116
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
117
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
118
+ </PropertyGroup>
119
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
120
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
121
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
122
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
123
+ </PropertyGroup>
124
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
125
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
126
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
127
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
128
+ </PropertyGroup>
129
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
130
+ <ClCompile>
131
+ <WarningLevel>Level3</WarningLevel>
132
+ <Optimization>Disabled</Optimization>
133
+ <SDLCheck>true</SDLCheck>
134
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
135
+ </ClCompile>
136
+ </ItemDefinitionGroup>
137
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
138
+ <ClCompile>
139
+ <WarningLevel>Level3</WarningLevel>
140
+ <Optimization>Disabled</Optimization>
141
+ <SDLCheck>true</SDLCheck>
142
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
+ </ClCompile>
144
+ </ItemDefinitionGroup>
145
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
146
+ <ClCompile>
147
+ <WarningLevel>Level3</WarningLevel>
148
+ <Optimization>MaxSpeed</Optimization>
149
+ <FunctionLevelLinking>true</FunctionLevelLinking>
150
+ <IntrinsicFunctions>true</IntrinsicFunctions>
151
+ <SDLCheck>true</SDLCheck>
152
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
153
+ </ClCompile>
154
+ <Link>
155
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
156
+ <OptimizeReferences>true</OptimizeReferences>
157
+ </Link>
158
+ </ItemDefinitionGroup>
159
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
160
+ <ClCompile>
161
+ <WarningLevel>Level3</WarningLevel>
162
+ <Optimization>MaxSpeed</Optimization>
163
+ <FunctionLevelLinking>true</FunctionLevelLinking>
164
+ <IntrinsicFunctions>true</IntrinsicFunctions>
165
+ <SDLCheck>true</SDLCheck>
166
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
167
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
168
+ </ClCompile>
169
+ <Link>
170
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
171
+ <OptimizeReferences>true</OptimizeReferences>
172
+ </Link>
173
+ </ItemDefinitionGroup>
174
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
175
+ <ClCompile>
176
+ <WarningLevel>Level3</WarningLevel>
177
+ <Optimization>MaxSpeed</Optimization>
178
+ <FunctionLevelLinking>true</FunctionLevelLinking>
179
+ <IntrinsicFunctions>true</IntrinsicFunctions>
180
+ <SDLCheck>true</SDLCheck>
181
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
182
+ </ClCompile>
183
+ <Link>
184
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
185
+ <OptimizeReferences>true</OptimizeReferences>
186
+ </Link>
187
+ </ItemDefinitionGroup>
188
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
189
+ <ClCompile>
190
+ <WarningLevel>Level3</WarningLevel>
191
+ <Optimization>MaxSpeed</Optimization>
192
+ <FunctionLevelLinking>true</FunctionLevelLinking>
193
+ <IntrinsicFunctions>true</IntrinsicFunctions>
194
+ <SDLCheck>true</SDLCheck>
195
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
196
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
197
+ </ClCompile>
198
+ <Link>
199
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
200
+ <OptimizeReferences>true</OptimizeReferences>
201
+ </Link>
202
+ </ItemDefinitionGroup>
203
+ <ItemGroup>
204
+ <ClInclude Include="..\..\include\argon2.h" />
205
+ <ClInclude Include="..\..\src\blake2\blake2-impl.h" />
206
+ <ClInclude Include="..\..\src\blake2\blake2.h" />
207
+ <ClInclude Include="..\..\src\blake2\blamka-round-opt.h" />
208
+ <ClInclude Include="..\..\src\blake2\blamka-round-ref.h" />
209
+ <ClInclude Include="..\..\src\core.h" />
210
+ <ClInclude Include="..\..\src\encoding.h" />
211
+ <ClInclude Include="..\..\src\opt.h" />
212
+ <ClInclude Include="..\..\src\thread.h" />
213
+ </ItemGroup>
214
+ <ItemGroup>
215
+ <ClCompile Include="..\..\src\argon2.c" />
216
+ <ClCompile Include="..\..\src\blake2\blake2b.c" />
217
+ <ClCompile Include="..\..\src\core.c" />
218
+ <ClCompile Include="..\..\src\encoding.c" />
219
+ <ClCompile Include="..\..\src\opt.c" />
220
+ <ClCompile Include="..\..\src\run.c" />
221
+ <ClCompile Include="..\..\src\thread.c" />
222
+ </ItemGroup>
223
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
224
+ <ImportGroup Label="ExtensionTargets">
225
+ </ImportGroup>
226
+ </Project>
@@ -0,0 +1,69 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11
+ </Filter>
12
+ <Filter Include="Resource Files">
13
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15
+ </Filter>
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <ClInclude Include="..\..\include\argon2.h">
19
+ <Filter>Header Files</Filter>
20
+ </ClInclude>
21
+ <ClInclude Include="..\..\src\blake2\blake2.h">
22
+ <Filter>Header Files</Filter>
23
+ </ClInclude>
24
+ <ClInclude Include="..\..\src\blake2\blake2-impl.h">
25
+ <Filter>Header Files</Filter>
26
+ </ClInclude>
27
+ <ClInclude Include="..\..\src\core.h">
28
+ <Filter>Header Files</Filter>
29
+ </ClInclude>
30
+ <ClInclude Include="..\..\src\encoding.h">
31
+ <Filter>Header Files</Filter>
32
+ </ClInclude>
33
+ <ClInclude Include="..\..\src\opt.h">
34
+ <Filter>Header Files</Filter>
35
+ </ClInclude>
36
+ <ClInclude Include="..\..\src\thread.h">
37
+ <Filter>Header Files</Filter>
38
+ </ClInclude>
39
+ <ClInclude Include="..\..\src\blake2\blamka-round-opt.h">
40
+ <Filter>Header Files</Filter>
41
+ </ClInclude>
42
+ <ClInclude Include="..\..\src\blake2\blamka-round-ref.h">
43
+ <Filter>Header Files</Filter>
44
+ </ClInclude>
45
+ </ItemGroup>
46
+ <ItemGroup>
47
+ <ClCompile Include="..\..\src\argon2.c">
48
+ <Filter>Source Files</Filter>
49
+ </ClCompile>
50
+ <ClCompile Include="..\..\src\core.c">
51
+ <Filter>Source Files</Filter>
52
+ </ClCompile>
53
+ <ClCompile Include="..\..\src\encoding.c">
54
+ <Filter>Source Files</Filter>
55
+ </ClCompile>
56
+ <ClCompile Include="..\..\src\opt.c">
57
+ <Filter>Source Files</Filter>
58
+ </ClCompile>
59
+ <ClCompile Include="..\..\src\run.c">
60
+ <Filter>Source Files</Filter>
61
+ </ClCompile>
62
+ <ClCompile Include="..\..\src\thread.c">
63
+ <Filter>Source Files</Filter>
64
+ </ClCompile>
65
+ <ClCompile Include="..\..\src\blake2\blake2b.c">
66
+ <Filter>Source Files</Filter>
67
+ </ClCompile>
68
+ </ItemGroup>
69
+ </Project>