diff options
author | Stephen Jennings <Stephen.G.Jennings@gmail.com> | 2011-11-03 21:12:47 -0700 |
---|---|---|
committer | Stephen Jennings <Stephen.G.Jennings@gmail.com> | 2011-11-03 21:12:47 -0700 |
commit | 5dcd3fbb44822b31e47f46cf8ad71f44c41590fc (patch) | |
tree | 8ea56eff05c00b37f2e0da581241a1bca3593783 | |
parent | 0a696506bef7c1cbe550c71e86f91ae73b30cbd3 (diff) | |
download | OATH.Net-5dcd3fbb44822b31e47f46cf8ad71f44c41590fc.zip OATH.Net-5dcd3fbb44822b31e47f46cf8ad71f44c41590fc.tar.gz OATH.Net-5dcd3fbb44822b31e47f46cf8ad71f44c41590fc.tar.bz2 |
Create the key class.
-rw-r--r-- | OATH.Net/Key.cs | 67 | ||||
-rw-r--r-- | OATH.Net/OATH.Net.csproj | 19 |
2 files changed, 74 insertions, 12 deletions
diff --git a/OATH.Net/Key.cs b/OATH.Net/Key.cs new file mode 100644 index 0000000..ec552af --- /dev/null +++ b/OATH.Net/Key.cs @@ -0,0 +1,67 @@ +//------------------------------------------------------------------------------------ +// <copyright file="Key.cs" company="Stephen Jennings"> +// Copyright 2011 Stephen Jennings. Licensed under the Apache License, Version 2.0. +// </copyright> +//------------------------------------------------------------------------------------ + +namespace OathNet +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + + /// <summary> + /// Represents a secret key used for the one-time password generation. + /// </summary> + public class Key + { + /// <summary> + /// Initializes a new instance of the Key class and generates a random key. + /// </summary> + public Key() + { + throw new NotImplementedException(); + } + + /// <summary> + /// Initializes a new instance of the Key class. + /// </summary> + /// <param name="data">The key to initialize.</param> + public Key(byte[] data) + { + throw new NotImplementedException(); + } + + /// <summary> + /// Initializes a new instance of the Key class. + /// </summary> + /// <param name="base32key">The key to initialize.</param> + public Key(string base32key) + { + throw new NotImplementedException(); + } + + /// <summary> + /// Gets the key represented as a byte array. + /// </summary> + public byte[] Binary + { + get + { + throw new NotImplementedException(); + } + } + + /// <summary> + /// Gets the key represented as base32-encoded string. + /// </summary> + public string Base32 + { + get + { + throw new NotImplementedException(); + } + } + } +} diff --git a/OATH.Net/OATH.Net.csproj b/OATH.Net/OATH.Net.csproj index 6680c9b..155da01 100644 --- a/OATH.Net/OATH.Net.csproj +++ b/OATH.Net/OATH.Net.csproj @@ -5,8 +5,7 @@ <VersionMinor>1</VersionMinor> </PropertyGroup> <PropertyGroup> - <GitDescribeCommand> - <![CDATA[ + <GitDescribeCommand><![CDATA[ public static string ScriptMain() { System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo() @@ -22,8 +21,7 @@ int length = result.Length; return result.Substring(0,length-1); } - ]]> - </GitDescribeCommand> + ]]></GitDescribeCommand> </PropertyGroup> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -65,6 +63,7 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="Key.cs" /> <Compile Include="SHA512HMACAlgorithm.cs" /> <Compile Include="SHA256HMACAlgorithm.cs" /> <Compile Include="CounterBasedOtpGenerator.cs" /> @@ -81,17 +80,13 @@ <Import Project="$(MSBuildProjectDirectory)\..\packages\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> <Target Name="BeforeBuild"> <Script Language="C#" Code="$(GitDescribeCommand)"> - <Output TaskParameter="ReturnValue" PropertyName="GitDescribeResult"/> + <Output TaskParameter="ReturnValue" PropertyName="GitDescribeResult" /> </Script> <Version BuildType="Automatic" RevisionType="Automatic"> - <Output TaskParameter="Build" PropertyName="VersionBuild"/> - <Output TaskParameter="Revision" PropertyName="VersionRevision"/> + <Output TaskParameter="Build" PropertyName="VersionBuild" /> + <Output TaskParameter="Revision" PropertyName="VersionRevision" /> </Version> - <AssemblyInfo OutputFile="Properties\VersionAssemblyInfo.cs" - CodeLanguage="CS" - AssemblyVersion="$(VersionMajor).$(VersionMinor).0.0" - AssemblyFileVersion="$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)" - AssemblyInformationalVersion="$(GitDescribeResult)"/> + <AssemblyInfo OutputFile="Properties\VersionAssemblyInfo.cs" CodeLanguage="CS" AssemblyVersion="$(VersionMajor).$(VersionMinor).0.0" AssemblyFileVersion="$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)" AssemblyInformationalVersion="$(GitDescribeResult)" /> </Target> <Target Name="AfterBuild"> </Target> |