aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/fetch/http_digest.h
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit99609724f661f7e21d1cb08e8d80e87c3632fdb3 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/http/fetch/http_digest.h
parent980edcd3304699edf9d4e4d6a656e585028e2a72 (diff)
downloadydb-99609724f661f7e21d1cb08e8d80e87c3632fdb3.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/fetch/http_digest.h')
-rw-r--r--library/cpp/http/fetch/http_digest.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/http/fetch/http_digest.h b/library/cpp/http/fetch/http_digest.h
index 018107c2e4..3b1872d70b 100644
--- a/library/cpp/http/fetch/http_digest.h
+++ b/library/cpp/http/fetch/http_digest.h
@@ -1,10 +1,10 @@
#pragma once
-
+
#include "httpheader.h"
-#include <util/system/compat.h>
+#include <util/system/compat.h>
#include <library/cpp/http/misc/httpcodes.h>
-
+
class httpDigestHandler {
protected:
const char* User_;
@@ -12,36 +12,36 @@ protected:
char* Nonce_;
int NonceCount_;
char* HeaderInstruction_;
-
- void clear();
-
+
+ void clear();
+
void generateCNonce(char* outCNonce);
-
+
void digestCalcHA1(const THttpAuthHeader& hd,
char* outSessionKey,
char* outCNonce);
-
+
void digestCalcResponse(const THttpAuthHeader& hd,
const char* method,
const char* path,
const char* nonceCount,
char* outResponse,
char* outCNonce);
-
+
public:
- httpDigestHandler();
- ~httpDigestHandler();
-
+ httpDigestHandler();
+ ~httpDigestHandler();
+
void setAuthorization(const char* user,
const char* password);
bool processHeader(const THttpAuthHeader* header,
const char* path,
const char* method,
const char* cnonce = nullptr);
-
+
bool empty() const {
return (!User_);
- }
-
+ }
+
const char* getHeaderInstruction() const;
-};
+};