Merge branch 'MichaelTheShifter-crypto'

t push origin master# Please enter a commit message to explain why this merge is
This commit is contained in:
Matthijs ter Woord 2016-06-18 11:40:53 -04:00
commit 446f5fcb52
9 changed files with 233 additions and 9 deletions

View file

@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Package Name")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Company")]
[assembly: AssemblyProduct("Package Name")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cosmos.Compiler.Tests.Encryption</RootNamespace>
<AssemblyName>Cosmos.Compiler.Tests.Encryption</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Cosmos.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL" />
<Reference Include="Cosmos.Debug.Kernel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<Compile Include="Kernel.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cosmos.TestRunner.TestController\Cosmos.TestRunner.TestController.csproj">
<Project>{E6D3B644-C487-472D-A978-C1A82D0C099B}</Project>
<Name>Cosmos.TestRunner.TestController</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{ccf11819-c8f9-4a74-acae-1421b06720b6}</ProjectGuid>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<Name>Cosmos.Compiler.Tests.EncryptionBoot</Name>
<BinFormat>elf</BinFormat>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Profile>VMware</Profile>
<DebugEnabled>true</DebugEnabled>
<DebugMode>Source</DebugMode>
<TraceMode>User</TraceMode>
<EnableGDB>False</EnableGDB>
<StartCosmosGDB>false</StartCosmosGDB>
<VMWareEdition>Player</VMWareEdition>
<OutputPath>bin\Debug\</OutputPath>
<Name>Cosmos.Compiler.Tests.EncryptionBoot</Name>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
<Deployment>ISO</Deployment>
<Launch>VMware</Launch>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include=".\Cosmos.Compiler.Tests.Encryption.">
<Name>Cosmos.Compiler.Tests.Encryption</Name>
<Project>{48ebdeb2-6a6a-4df2-b5f1-db6d299401f2}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
<Reference Include="Cosmos.System.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
</ItemGroup>
<!--<ItemGroup>
<Content Include="Cosmos.bxrc">
<SubType>Content</SubType>
</Content>
</ItemGroup>-->
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
</Project>

View file

@ -0,0 +1,31 @@
using Cosmos.TestRunner;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using Sys = Cosmos.System;
namespace Cosmos.Compiler.Tests.Encryption
{
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
Console.WriteLine("Cosmos booted successfully. Starting tests.");
}
protected override void Run()
{
TestSHA1();
TestController.Completed();
}
public void TestSHA1()
{
byte[] data = new byte[256];
byte[] result;
var shaM = new SHA1Managed();
result = shaM.ComputeHash(data);
}
}
}

View file

@ -113,6 +113,10 @@
<Compile Include="TestKernelSets.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Demos\zMachine\Frotz.Net\source\FrotzKernel\FrotzKernel\FrotzKernel\FrotzKernel.csproj">
<Project>{c18a7cf8-3205-48a8-95c9-08c780a0d51d}</Project>
<Name>FrotzKernel</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\Cosmos.Assembler\Cosmos.Assembler.csproj">
<Project>{1116130E-28E0-428A-A597-F4B3B676C0CA}</Project>
<Name>Cosmos.Assembler</Name>
@ -173,6 +177,10 @@
<Project>{31e3f8e2-7cc0-426c-accb-77b3319af5d3}</Project>
<Name>Cosmos.Compiler.Tests.Bcl</Name>
</ProjectReference>
<ProjectReference Include="..\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.csproj">
<Project>{48ebdeb2-6a6a-4df2-b5f1-db6d299401f2}</Project>
<Name>Cosmos.Compiler.Tests.Encryption</Name>
</ProjectReference>
<ProjectReference Include="..\Cosmos.Compiler.Tests.Exceptions\Cosmos.Compiler.Tests.Exceptions.csproj">
<Project>{9df5c0a9-b91c-4647-b939-e47513743a0c}</Project>
<Name>Cosmos.Compiler.Tests.Exceptions</Name>

View file

@ -8,6 +8,7 @@ namespace Cosmos.TestRunner.Core
public static IEnumerable<Type> GetStableKernelTypes()
{
yield return typeof(VGACompilerCrash.Kernel);
//yield return typeof(Cosmos.Compiler.Tests.Encryption.Kernel);
yield return typeof(Cosmos.Compiler.Tests.Bcl.Kernel);
yield return typeof(Cosmos.Compiler.Tests.SingleEchoTest.Kernel);
yield return typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel);

View file

@ -10,6 +10,14 @@ namespace Cosmos.System.Plugs.System.Security.Cryptography
[Plug(Target = typeof(global::System.Security.Cryptography.CryptoConfig))]
class CryptoConfigImpl
{
///<summary>
///The stock .NET constructor for CryptoConfig deals with dictionaries we don't need.
///</summary>
public static void CCtor() {
}
/// <summary>Indicates whether the runtime should enforce the policy to create only Federal Information Processing Standard (FIPS) certified algorithms.</summary>
/// <returns>true to enforce the policy; otherwise, false. </returns>
public static bool AllowOnlyFipsAlgorithms

View file

@ -136,15 +136,6 @@
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AsmLine.cs" />

View file

@ -270,6 +270,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zConsole", "..\Demos\zMachine\Frotz.Net\source\zConsole\zConsole.csproj", "{3E4A8079-AAC0-429D-B042-0B5151E0E5BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Compiler.Tests.Encryption", "..\Tests\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.csproj", "{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}"
EndProject
Project("{471EC4BB-E47E-4229-A789-D1F5F83B52D4}") = "Cosmos.Compiler.Tests.EncryptionBoot", "..\Tests\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.EncryptionBoot.Cosmos", "{CCF11819-C8F9-4A74-ACAE-1421B06720B6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -827,6 +831,7 @@ Global
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Debug|Mixed Platforms.Build.0 = Debug|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Debug|x64.ActiveCfg = Debug|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Debug|x86.ActiveCfg = Debug|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Debug|x86.Build.0 = Debug|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Release|Any CPU.ActiveCfg = Debug|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Release|Mixed Platforms.ActiveCfg = Release|x86
{E5647BFD-1507-4F02-A7D5-E0F9D6AECE3A}.Release|Mixed Platforms.Build.0 = Release|x86
@ -876,6 +881,7 @@ Global
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Debug|Mixed Platforms.Build.0 = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Debug|x64.ActiveCfg = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Debug|x86.ActiveCfg = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Debug|x86.Build.0 = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Release|Any CPU.ActiveCfg = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Release|Mixed Platforms.ActiveCfg = Debug|x86
{8E3537CB-D0F9-4CFB-AE6F-72B465CA03F6}.Release|Mixed Platforms.Build.0 = Debug|x86
@ -887,6 +893,7 @@ Global
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Debug|Mixed Platforms.Build.0 = Debug|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Debug|x64.ActiveCfg = Debug|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Debug|x86.ActiveCfg = Debug|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Debug|x86.Build.0 = Debug|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Release|Any CPU.ActiveCfg = Debug|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Release|Mixed Platforms.ActiveCfg = Release|x86
{82F6DDA3-E45D-4E7A-AA09-85FC2EDE2F76}.Release|Mixed Platforms.Build.0 = Release|x86
@ -898,6 +905,7 @@ Global
{E978986A-8160-4979-919E-F099A43EF146}.Debug|Mixed Platforms.Build.0 = Debug|x86
{E978986A-8160-4979-919E-F099A43EF146}.Debug|x64.ActiveCfg = Debug|x86
{E978986A-8160-4979-919E-F099A43EF146}.Debug|x86.ActiveCfg = Debug|x86
{E978986A-8160-4979-919E-F099A43EF146}.Debug|x86.Build.0 = Debug|x86
{E978986A-8160-4979-919E-F099A43EF146}.Release|Any CPU.ActiveCfg = Debug|x86
{E978986A-8160-4979-919E-F099A43EF146}.Release|Mixed Platforms.ActiveCfg = Release|x86
{E978986A-8160-4979-919E-F099A43EF146}.Release|Mixed Platforms.Build.0 = Release|x86
@ -1035,6 +1043,7 @@ Global
{AB869246-4887-4117-851D-766EB9FF1E29}.Debug|Mixed Platforms.Build.0 = Debug|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Debug|x64.ActiveCfg = Debug|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Debug|x86.ActiveCfg = Debug|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Debug|x86.Build.0 = Debug|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Release|Any CPU.ActiveCfg = Debug|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Release|Mixed Platforms.ActiveCfg = Release|x86
{AB869246-4887-4117-851D-766EB9FF1E29}.Release|Mixed Platforms.Build.0 = Release|x86
@ -1501,6 +1510,7 @@ Global
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Debug|Mixed Platforms.Build.0 = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Debug|x64.ActiveCfg = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Debug|x86.ActiveCfg = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Debug|x86.Build.0 = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Release|Any CPU.ActiveCfg = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Release|Any CPU.Build.0 = Debug|x86
{511C4498-E62A-4FF2-94BA-472CF448B39B}.Release|Mixed Platforms.ActiveCfg = Debug|x86
@ -1540,6 +1550,38 @@ Global
{3E4A8079-AAC0-429D-B042-0B5151E0E5BE}.Release|x64.Build.0 = Release|Any CPU
{3E4A8079-AAC0-429D-B042-0B5151E0E5BE}.Release|x86.ActiveCfg = Release|Any CPU
{3E4A8079-AAC0-429D-B042-0B5151E0E5BE}.Release|x86.Build.0 = Release|Any CPU
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|Any CPU.ActiveCfg = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|Any CPU.Build.0 = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|Mixed Platforms.Build.0 = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|x64.ActiveCfg = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|x64.Build.0 = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|x86.ActiveCfg = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Debug|x86.Build.0 = Debug|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|Any CPU.ActiveCfg = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|Any CPU.Build.0 = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|Mixed Platforms.ActiveCfg = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|Mixed Platforms.Build.0 = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|x64.ActiveCfg = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|x64.Build.0 = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|x86.ActiveCfg = Release|x86
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2}.Release|x86.Build.0 = Release|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|Any CPU.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|Any CPU.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|Mixed Platforms.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|x64.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|x64.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|x86.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Debug|x86.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|Any CPU.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|Any CPU.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|Mixed Platforms.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|Mixed Platforms.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|x64.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|x64.Build.0 = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|x86.ActiveCfg = Debug|x86
{CCF11819-C8F9-4A74-ACAE-1421B06720B6}.Release|x86.Build.0 = Debug|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1647,5 +1689,7 @@ Global
{A843C6B0-CFF3-4A69-87BC-C93608235E47} = {0CB537D9-19BB-4185-9E9A-E1305F100B54}
{57B83EE4-164F-4BB2-8AFA-76445333A0E4} = {0CB537D9-19BB-4185-9E9A-E1305F100B54}
{3E4A8079-AAC0-429D-B042-0B5151E0E5BE} = {0CB537D9-19BB-4185-9E9A-E1305F100B54}
{48EBDEB2-6A6A-4DF2-B5F1-DB6D299401F2} = {F104F6BC-EF8E-4408-A786-D570D7565231}
{CCF11819-C8F9-4A74-ACAE-1421B06720B6} = {F104F6BC-EF8E-4408-A786-D570D7565231}
EndGlobalSection
EndGlobal