зеркало из https://github.com/microsoft/SEAL.git
Minor clean-up
This commit is contained in:
Родитель
410611fe4f
Коммит
b2759db037
|
@ -89,7 +89,7 @@ namespace SEALNetExamples
|
|||
In this example the PlainModulus does not play much of a role; we choose
|
||||
some reasonable value.
|
||||
*/
|
||||
parms.PlainModulus = PlainModulus.Batching(polyModulusDegree, 20);//new SmallModulus(1 << 20);
|
||||
parms.PlainModulus = PlainModulus.Batching(polyModulusDegree, 20);
|
||||
|
||||
SEALContext context = new SEALContext(parms);
|
||||
Utilities.PrintParameters(context);
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<Authors>Microsoft Research</Authors>
|
||||
<Company>Microsoft Corporation</Company>
|
||||
<Description>.NET wrapper examples for Microsoft SEAL</Description>
|
||||
<Copyright>Microsoft Corporation 2019</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>../bin/$(Configuration)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../src/SEALNet.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="$(ProjectDir)../lib/x64/$(Configuration)/sealnetnative.dll" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="$(ProjectDir)../lib/libsealnetnative.so.*" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="$(ProjectDir)../lib/libsealnetnative.*.dylib" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Copy SourceFiles="@(SEALNetNativeBinaryFiles)" DestinationFolder="$(TargetDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<Authors>Microsoft Research</Authors>
|
||||
<Company>Microsoft Corporation</Company>
|
||||
<Description>.NET wrapper examples for Microsoft SEAL</Description>
|
||||
<Copyright>Microsoft Corporation 2019</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>../bin/$(Configuration)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../src/SEALNet.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="$(ProjectDir)../lib/x64/$(Configuration)/sealnetnative.dll" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="$(ProjectDir)../lib/libsealnetnative.so.*" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="$(ProjectDir)../lib/libsealnetnative.*.dylib" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Copy SourceFiles="@(SEALNetNativeBinaryFiles)" DestinationFolder="$(TargetDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Authors>Microsoft Research</Authors>
|
||||
<Company>Microsoft Corporation</Company>
|
||||
<Description>.NET wrapper unit tests for Microsoft SEAL</Description>
|
||||
<Copyright>Microsoft Corporation 2019</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>../lib/$(Configuration)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../src/SEALNet.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="$(ProjectDir)../lib/x64/$(Configuration)/sealnetnative.dll" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="$(ProjectDir)../lib/libsealnetnative.so.*" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="$(ProjectDir)../lib/libsealnetnative*.dylib" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Copy SourceFiles="@(SEALNetNativeBinaryFiles)" DestinationFolder="$(TargetDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Authors>Microsoft Research</Authors>
|
||||
<Company>Microsoft Corporation</Company>
|
||||
<Description>.NET wrapper unit tests for Microsoft SEAL</Description>
|
||||
<Copyright>Microsoft Corporation 2019</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)'=='AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>../lib/$(Configuration)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../src/SEALNet.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="$(ProjectDir)../lib/x64/$(Configuration)/sealnetnative.dll" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="$(ProjectDir)../lib/libsealnetnative.so.*" />
|
||||
<SEALNetNativeBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="$(ProjectDir)../lib/libsealnetnative*.dylib" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Copy SourceFiles="@(SEALNetNativeBinaryFiles)" DestinationFolder="$(TargetDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1868,10 +1868,6 @@ namespace seal
|
|||
{
|
||||
throw invalid_argument("plain is not valid for encryption parameters");
|
||||
}
|
||||
if (!context_->get_context_data(encrypted.parms_id()))
|
||||
{
|
||||
throw invalid_argument("encrypted is not valid for encryption parameters");
|
||||
}
|
||||
if (encrypted.is_ntt_form() != plain.is_ntt_form())
|
||||
{
|
||||
throw invalid_argument("NTT form mismatch");
|
||||
|
|
Загрузка…
Ссылка в новой задаче