summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/hmac.h1
-rw-r--r--net/http/http_mac_signature.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/crypto/hmac.h b/crypto/hmac.h
index fcd2657..7852797 100644
--- a/crypto/hmac.h
+++ b/crypto/hmac.h
@@ -30,6 +30,7 @@ class HMAC {
explicit HMAC(HashAlgorithm hash_alg);
~HMAC();
+ // Returns the length of digest that this HMAC will create.
size_t DigestLength() const;
// TODO(abarth): Add a PreferredKeyLength() member function.
diff --git a/net/http/http_mac_signature.h b/net/http/http_mac_signature.h
index 1049240..543b954 100644
--- a/net/http/http_mac_signature.h
+++ b/net/http/http_mac_signature.h
@@ -14,6 +14,12 @@
namespace net {
+// This class represents an HTTP MAC signature for use in the HTTP MAC
+// Authentication scheme. The current draft specification of this
+// authentication scheme is located at the following URL:
+//
+// http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token
+//
class HttpMacSignature {
public:
HttpMacSignature();
@@ -31,6 +37,7 @@ class HttpMacSignature {
const std::string& host,
int port);
+ // Returns the value of the Authorization header for use in an HTTP request.
std::string GenerateAuthorizationHeader();
private: