summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth/ICryptoKeyStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth/ICryptoKeyStore.cs')
-rw-r--r--src/DotNetOpenAuth/ICryptoKeyStore.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/ICryptoKeyStore.cs b/src/DotNetOpenAuth/ICryptoKeyStore.cs
index d2a5147..cc96b99 100644
--- a/src/DotNetOpenAuth/ICryptoKeyStore.cs
+++ b/src/DotNetOpenAuth/ICryptoKeyStore.cs
@@ -62,8 +62,13 @@ namespace DotNetOpenAuth {
[ContractClassFor(typeof(ICryptoKeyStore))]
internal abstract class ICryptoKeyStoreContract : ICryptoKeyStore {
/// <summary>
- /// See the <see cref="ICryptoKeyStore"/> interface.
+ /// 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) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(bucket));
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(handle));
@@ -71,8 +76,12 @@ namespace DotNetOpenAuth {
}
/// <summary>
- /// See the <see cref="ICryptoKeyStore"/> interface.
+ /// 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) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(bucket));
Contract.Ensures(Contract.Result<IEnumerable<KeyValuePair<string, CryptoKey>>>() != null);
@@ -80,8 +89,12 @@ namespace DotNetOpenAuth {
}
/// <summary>
- /// See the <see cref="ICryptoKeyStore"/> interface.
+ /// 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) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(bucket));
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(handle));
@@ -90,8 +103,10 @@ namespace DotNetOpenAuth {
}
/// <summary>
- /// See the <see cref="ICryptoKeyStore"/> interface.
+ /// 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) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(bucket));
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(handle));