1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Merge pull request #205 from evoskuil/master

Update VS projects and fix test warnings.
This commit is contained in:
Frank Denis 2014-11-20 12:00:06 -08:00
commit 394c6a1970
19 changed files with 135 additions and 102 deletions

View File

@ -14,10 +14,8 @@
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NATIVE_LITTLE_ENDIAN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
</Project>
</Project>

View File

@ -20,8 +20,10 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -36,4 +38,4 @@
</ClCompile>
</ItemDefinitionGroup>
</Project>
</Project>

Binary file not shown.

View File

@ -64,9 +64,12 @@
<Import Project="$(ProjectDir)$(ProjectName).props" />
</ImportGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<ExcludedFromBuild>false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth2.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -76,6 +79,12 @@
<ClCompile Include="..\..\..\..\test\default\auth5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\box.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -211,10 +220,7 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
@ -223,4 +229,4 @@
<ClInclude Include="..\..\..\..\test\quirks\windows\windows-quirks.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
</Project>

View File

@ -142,18 +142,24 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\sign.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\pwhash.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\test\default\cmptest.h">
@ -171,4 +177,4 @@
<UniqueIdentifier>{5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
</Project>

View File

@ -64,9 +64,12 @@
<Import Project="$(ProjectDir)$(ProjectName).props" />
</ImportGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<ExcludedFromBuild>false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth2.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -76,6 +79,12 @@
<ClCompile Include="..\..\..\..\test\default\auth5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\box.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -211,10 +220,7 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
@ -223,4 +229,4 @@
<ClInclude Include="..\..\..\..\test\quirks\windows\windows-quirks.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
</Project>

View File

@ -142,18 +142,24 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\sign.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\pwhash.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\test\default\cmptest.h">
@ -171,4 +177,4 @@
<UniqueIdentifier>{5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
</Project>

View File

@ -64,9 +64,12 @@
<Import Project="$(ProjectDir)$(ProjectName).props" />
</ImportGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<ExcludedFromBuild>false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth2.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -76,6 +79,12 @@
<ClCompile Include="..\..\..\..\test\default\auth5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\box.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -211,10 +220,7 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
@ -223,4 +229,4 @@
<ClInclude Include="..\..\..\..\test\quirks\windows\windows-quirks.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
</Project>

View File

@ -142,18 +142,24 @@
<ClCompile Include="..\..\..\..\test\default\stream4.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream5.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\stream6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\sign.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\pwhash.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\aead_chacha20poly1305.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth6.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\auth7.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\default\verify1.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\test\default\cmptest.h">
@ -171,4 +177,4 @@
<UniqueIdentifier>{5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- These values are populated into the package.gsl templates by package.bat. -->
<!-- The target attribute controls path and file name only, id controls package naming. -->
<package id="libsodium_vc120" target="libsodium" version = "0.7.0.0" pathversion="0_7_0_0" platformtoolset="v120" />
<package id="libsodium_vc120" target="libsodium" version = "1.0.0.0" pathversion="1_0_0_0" platformtoolset="v120" />

View File

@ -7,7 +7,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>libsodium_vc120</id>
<version>0.7.0.0</version>
<version>1.0.0.0</version>
<title>libsodium_vc120</title>
<authors>libsodium contributors</authors>
<owners>Eric Voskuil</owners>
@ -40,52 +40,52 @@
<!-- libraries -->
<!-- x86 Dynamic libraries (.dll) -->
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.dll" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.dll" />
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-1_0_0_0.dll" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-gd-1_0_0_0.dll" />
<!-- x86 Debugging symbols (.pdb) -->
<!--<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.pdb" />-->
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.pdb" />
<!--<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-1_0_0_0.pdb" />-->
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-gd-1_0_0_0.pdb" />
<!-- x86 Import libraries (.imp.lib) -->
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.imp.lib" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.imp.lib" />
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-1_0_0_0.imp.lib" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-gd-1_0_0_0.imp.lib" />
<!-- x86 Export libraries (.exp) -->
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.exp" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.exp" />
<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-1_0_0_0.exp" />
<file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-gd-1_0_0_0.exp" />
<!-- x86 Static libraries (.lib) -->
<file src="..\..\bin\Win32\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_7_0_0.lib" />
<file src="..\..\bin\Win32\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_7_0_0.lib" />
<file src="..\..\bin\Win32\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-1_0_0_0.lib" />
<file src="..\..\bin\Win32\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-1_0_0_0.lib" />
<!-- x86 Static link time code generation libraries (.ltcg.lib) -->
<file src="..\..\bin\Win32\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_7_0_0.ltcg.lib" />
<file src="..\..\bin\Win32\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_7_0_0.ltcg.lib" />
<file src="..\..\bin\Win32\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-1_0_0_0.ltcg.lib" />
<file src="..\..\bin\Win32\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-1_0_0_0.ltcg.lib" />
<!-- x64 Dynamic libraries (.dll) -->
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.dll" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.dll" />
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-1_0_0_0.dll" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-gd-1_0_0_0.dll" />
<!-- x64 Debugging symbols (.pdb) -->
<!--<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.pdb" />-->
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.pdb" />
<!--<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-1_0_0_0.pdb" />-->
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-gd-1_0_0_0.pdb" />
<!-- x64 Import libraries (.imp.lib) -->
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.imp.lib" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.imp.lib" />
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-1_0_0_0.imp.lib" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-gd-1_0_0_0.imp.lib" />
<!-- x64 Export libraries (.exp) -->
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.exp" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.exp" />
<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-1_0_0_0.exp" />
<file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-gd-1_0_0_0.exp" />
<!-- x64 Static libraries (.lib) -->
<file src="..\..\bin\x64\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_7_0_0.lib" />
<file src="..\..\bin\x64\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_7_0_0.lib" />
<file src="..\..\bin\x64\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-1_0_0_0.lib" />
<file src="..\..\bin\x64\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-1_0_0_0.lib" />
<!-- x64 Static link time code generation libraries (.ltcg.lib) -->
<file src="..\..\bin\x64\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_7_0_0.ltcg.lib" />
<file src="..\..\bin\x64\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_7_0_0.ltcg.lib" />
<file src="..\..\bin\x64\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-1_0_0_0.ltcg.lib" />
<file src="..\..\bin\x64\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-1_0_0_0.ltcg.lib" />
</files>
<!--
#################################################################

View File

@ -30,66 +30,66 @@
<!-- static libraries -->
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-s-1_0_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-1_0_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-s-1_0_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-1_0_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- static ltcg libraries -->
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-s-1_0_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-sgd-1_0_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-s-1_0_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-sgd-1_0_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- dynamic import libraries -->
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-1_0_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x86-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x86-v120-mt-gd-1_0_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-1_0_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
<Link>
<AdditionalDependencies>libsodium-x64-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libsodium-x64-v120-mt-gd-1_0_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -98,26 +98,26 @@
<Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Release"
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
AfterTargets="libsodium_AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-1_0_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-1_0_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
</Target>
<Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Debug"
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
AfterTargets="libsodium_AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-1_0_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-1_0_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
</Target>
<Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Release"
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
AfterTargets="libsodium_AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-1_0_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-1_0_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
</Target>
<Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Debug"
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
AfterTargets="libsodium_AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-1_0_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-1_0_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
</Target>
<!--

View File

@ -14,12 +14,12 @@ unsigned char mac[crypto_box_MACBYTES];
int main(void)
{
unsigned long long mlen;
uint32_t mlen;
unsigned long long i;
crypto_box_keypair(alicepk, alicesk);
crypto_box_keypair(bobpk, bobsk);
mlen = (unsigned long long)randombytes_uniform((uint32_t)sizeof m);
mlen = randombytes_uniform((uint32_t)sizeof m);
randombytes_buf(m, mlen);
randombytes_buf(nonce, sizeof nonce);
crypto_box_easy(c, m, mlen, nonce, bobpk, alicesk);

View File

@ -7,7 +7,7 @@ int main(void)
#define MAXLEN 64
unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX],
k[crypto_generichash_KEYBYTES_MAX];
size_t h, i, j;
unsigned char h, i, j;
for (h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h)
k[h] = h;

View File

@ -8,7 +8,7 @@ int main(void)
crypto_generichash_state st;
unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX],
k[crypto_generichash_KEYBYTES_MAX];
size_t h, i, j;
unsigned char h, i, j;
for (h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h)
k[h] = h;

View File

@ -14,7 +14,7 @@ int main(void)
'3', '7', '4', '0', '0', 'd', '2', 'a' };
unsigned char in[MAXLEN], out[crypto_generichash_blake2b_BYTES_MAX],
k[crypto_generichash_blake2b_KEYBYTES_MAX];
size_t h, i, j;
unsigned char h, i, j;
for (h = 0; h < crypto_generichash_blake2b_KEYBYTES_MAX; ++h)
k[h] = h;

View File

@ -8,7 +8,7 @@ static void tv(void)
const char *passwd_hex;
unsigned long long passwdlen;
const char *salt_hex;
unsigned long long outlen;
size_t outlen;
unsigned long long opslimit;
size_t memlimit;
} tests[] = {
@ -114,7 +114,7 @@ static void tv2(void)
const char *passwd_hex;
unsigned long long passwdlen;
const char *salt_hex;
unsigned long long outlen;
size_t outlen;
unsigned long long opslimit;
size_t memlimit;
} tests[] = {
@ -285,11 +285,8 @@ int main(void)
{
char str_out[crypto_pwhash_scryptsalsa208sha256_STRBYTES];
char str_out2[crypto_pwhash_scryptsalsa208sha256_STRBYTES];
unsigned char out[OUT_LEN];
char out_hex[OUT_LEN * 2 + 1];
const char *salt = "[<~A 32-bytes salt for scrypt~>]";
const char *passwd = "Correct Horse Battery Staple";
size_t i;
tv();
tv2();

View File

@ -11,11 +11,11 @@ unsigned char mac[crypto_secretbox_MACBYTES];
int main(void)
{
unsigned long long mlen;
uint32_t mlen;
unsigned long long i;
randombytes_buf(k, sizeof k);
mlen = (unsigned long long)randombytes_uniform((uint32_t)sizeof m);
mlen = randombytes_uniform((uint32_t)sizeof m);
randombytes_buf(m, mlen);
randombytes_buf(nonce, sizeof nonce);
crypto_secretbox_easy(c, m, mlen, nonce, k);

View File

@ -7,7 +7,7 @@ int main(void)
#define MAXLEN 64
unsigned char in[MAXLEN], out[crypto_shorthash_BYTES],
k[crypto_shorthash_KEYBYTES];
size_t i, j;
unsigned char i, j;
for (i = 0; i < crypto_shorthash_KEYBYTES; ++i)
k[i] = i;