summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs b/src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs
index 7493b19..ce7bf42 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Bindings/ICryptoKeyStore.cs
@@ -8,7 +8,6 @@ namespace DotNetOpenAuth.Messaging.Bindings {
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
- using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using DotNetOpenAuth.Messaging;
@@ -24,7 +23,6 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// of the confidentiality of the keys. One possible mitigation is to asymmetrically encrypt
/// each key using a certificate installed in the server's certificate store.
/// </remarks>
- [ContractClass(typeof(ICryptoKeyStoreContract))]
public interface ICryptoKeyStore {
/// <summary>
/// Gets the key in a given bucket and handle.
@@ -58,62 +56,4 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// <param name="handle">The key handle. Case sensitive.</param>
void RemoveKey(string bucket, string handle);
}
-
- /// <summary>
- /// Code contract for the <see cref="ICryptoKeyStore"/> interface.
- /// </summary>
- [ContractClassFor(typeof(ICryptoKeyStore))]
- internal abstract class ICryptoKeyStoreContract : ICryptoKeyStore {
- /// <summary>
- /// Gets the key in a given bucket and handle.
- /// </summary>
- /// <param name="bucket">The bucket name. Case sensitive.</param>
- /// <param name="handle">The key handle. Case sensitive.</param>
- /// <returns>
- /// The cryptographic key, or <c>null</c> if no matching key was found.
- /// </returns>
- CryptoKey ICryptoKeyStore.GetKey(string bucket, string handle) {
- Requires.NotNullOrEmpty(bucket, "bucket");
- Requires.NotNullOrEmpty(handle, "handle");
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Gets a sequence of existing keys within a given bucket.
- /// </summary>
- /// <param name="bucket">The bucket name. Case sensitive.</param>
- /// <returns>
- /// A sequence of handles and keys, ordered by descending <see cref="CryptoKey.ExpiresUtc"/>.
- /// </returns>
- IEnumerable<KeyValuePair<string, CryptoKey>> ICryptoKeyStore.GetKeys(string bucket) {
- Requires.NotNullOrEmpty(bucket, "bucket");
- Contract.Ensures(Contract.Result<IEnumerable<KeyValuePair<string, CryptoKey>>>() != null);
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Stores a cryptographic key.
- /// </summary>
- /// <param name="bucket">The name of the bucket to store the key in. Case sensitive.</param>
- /// <param name="handle">The handle to the key, unique within the bucket. Case sensitive.</param>
- /// <param name="key">The key to store.</param>
- /// <exception cref="CryptoKeyCollisionException">Thrown in the event of a conflict with an existing key in the same bucket and with the same handle.</exception>
- void ICryptoKeyStore.StoreKey(string bucket, string handle, CryptoKey key) {
- Requires.NotNullOrEmpty(bucket, "bucket");
- Requires.NotNullOrEmpty(handle, "handle");
- Requires.NotNull(key, "key");
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Removes the key.
- /// </summary>
- /// <param name="bucket">The bucket name. Case sensitive.</param>
- /// <param name="handle">The key handle. Case sensitive.</param>
- void ICryptoKeyStore.RemoveKey(string bucket, string handle) {
- Requires.NotNullOrEmpty(bucket, "bucket");
- Requires.NotNullOrEmpty(handle, "handle");
- throw new NotImplementedException();
- }
- }
}