XRootD
Loading...
Searching...
No Matches
XrdHttpChecksum.cc
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of XrdHTTP: A pragmatic implementation of the
3
// HTTP/WebDAV protocol for the Xrootd framework
4
//
5
// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
6
// Author: Cedric Caffy <ccaffy@cern.ch>
7
// File Date: Mar 2023
8
//------------------------------------------------------------------------------
9
// XRootD is free software: you can redistribute it and/or modify
10
// it under the terms of the GNU Lesser General Public License as published by
11
// the Free Software Foundation, either version 3 of the License, or
12
// (at your option) any later version.
13
//
14
// XRootD is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
18
//
19
// You should have received a copy of the GNU Lesser General Public License
20
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
21
//------------------------------------------------------------------------------
22
23
#include "
XrdHttpChecksum.hh
"
24
#include <algorithm>
25
26
XrdHttpChecksum::XrdHttpChecksum
(
const
std::string & xrootConfigDigestName,
const
std::string & httpName,
bool
needsBase64Padding
):
27
mXRootDConfigDigestName(xrootConfigDigestName),
28
mHTTPName(httpName),
29
mNeedsBase64Padding(
needsBase64Padding
) {
30
mHttpLowerCaseName.resize(mHTTPName.size());
31
std::transform(mHTTPName.begin(),mHTTPName.end(),mHttpLowerCaseName.begin(),::tolower);
32
}
33
34
std::string
XrdHttpChecksum::getHttpName
()
const
{
35
return
mHTTPName;
36
}
37
38
std::string
XrdHttpChecksum::getHttpNameLowerCase
()
const
{
39
return
mHttpLowerCaseName;
40
}
41
42
std::string
XrdHttpChecksum::getXRootDConfigDigestName
()
const
{
43
return
mXRootDConfigDigestName;
44
}
45
46
bool
XrdHttpChecksum::needsBase64Padding
()
const
{
47
return
mNeedsBase64Padding;
48
}
XrdHttpChecksum.hh
XrdHttpChecksum::needsBase64Padding
bool needsBase64Padding() const
Definition
XrdHttpChecksum.cc:46
XrdHttpChecksum::getXRootDConfigDigestName
std::string getXRootDConfigDigestName() const
Definition
XrdHttpChecksum.cc:42
XrdHttpChecksum::getHttpNameLowerCase
std::string getHttpNameLowerCase() const
Definition
XrdHttpChecksum.cc:38
XrdHttpChecksum::XrdHttpChecksum
XrdHttpChecksum(const std::string &xrootConfigDigestName, const std::string &httpName, bool needsBase64Padding)
Definition
XrdHttpChecksum.cc:26
XrdHttpChecksum::getHttpName
std::string getHttpName() const
Definition
XrdHttpChecksum.cc:34
XrdHttp
XrdHttpChecksum.cc
Generated by
1.15.0