aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h')
-rw-r--r--contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h162
1 files changed, 81 insertions, 81 deletions
diff --git a/contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h b/contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h
index 81c8a4d9ea..f5da1e7d41 100644
--- a/contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h
+++ b/contrib/libs/poco/Foundation/include/Poco/SHA1Engine.h
@@ -1,81 +1,81 @@
-//
-// SHA1Engine.h
-//
-// Library: Foundation
-// Package: Crypt
-// Module: SHA1Engine
-//
-// Definition of class SHA1Engine.
-//
-// Secure Hash Standard SHA-1 algorithm
-// (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm)
-//
-// Based on the public domain implementation by Peter C. Gutmann
-// on 2 Sep 1992, modified by Carl Ellison to be SHA-1.
-//
-// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
-// and Contributors.
-//
-// SPDX-License-Identifier: BSL-1.0
-//
-
-
-#ifndef Foundation_SHA1Engine_INCLUDED
-#define Foundation_SHA1Engine_INCLUDED
-
-
-#include "Poco/Foundation.h"
-#include "Poco/DigestEngine.h"
-
-
-namespace Poco {
-
-
-class Foundation_API SHA1Engine: public DigestEngine
- /// This class implementes the SHA-1 message digest algorithm.
- /// (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm)
-{
-public:
- enum
- {
- BLOCK_SIZE = 64,
- DIGEST_SIZE = 20
- };
-
- SHA1Engine();
- ~SHA1Engine();
-
- std::size_t digestLength() const;
- void reset();
- const DigestEngine::Digest& digest();
-
-protected:
- void updateImpl(const void* data, std::size_t length);
-
-private:
- void transform();
- static void byteReverse(UInt32* buffer, int byteCount);
-
- typedef UInt8 BYTE;
-
- struct Context
- {
- UInt32 digest[5]; // Message digest
- UInt32 countLo; // 64-bit bit count
- UInt32 countHi;
- UInt32 data[16]; // SHA data buffer
- UInt32 slop; // # of bytes saved in data[]
- };
-
- Context _context;
- DigestEngine::Digest _digest;
-
- SHA1Engine(const SHA1Engine&);
- SHA1Engine& operator = (const SHA1Engine&);
-};
-
-
-} // namespace Poco
-
-
-#endif // Foundation_SHA1Engine_INCLUDED
+//
+// SHA1Engine.h
+//
+// Library: Foundation
+// Package: Crypt
+// Module: SHA1Engine
+//
+// Definition of class SHA1Engine.
+//
+// Secure Hash Standard SHA-1 algorithm
+// (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm)
+//
+// Based on the public domain implementation by Peter C. Gutmann
+// on 2 Sep 1992, modified by Carl Ellison to be SHA-1.
+//
+// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// SPDX-License-Identifier: BSL-1.0
+//
+
+
+#ifndef Foundation_SHA1Engine_INCLUDED
+#define Foundation_SHA1Engine_INCLUDED
+
+
+#include "Poco/Foundation.h"
+#include "Poco/DigestEngine.h"
+
+
+namespace Poco {
+
+
+class Foundation_API SHA1Engine: public DigestEngine
+ /// This class implementes the SHA-1 message digest algorithm.
+ /// (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm)
+{
+public:
+ enum
+ {
+ BLOCK_SIZE = 64,
+ DIGEST_SIZE = 20
+ };
+
+ SHA1Engine();
+ ~SHA1Engine();
+
+ std::size_t digestLength() const;
+ void reset();
+ const DigestEngine::Digest& digest();
+
+protected:
+ void updateImpl(const void* data, std::size_t length);
+
+private:
+ void transform();
+ static void byteReverse(UInt32* buffer, int byteCount);
+
+ typedef UInt8 BYTE;
+
+ struct Context
+ {
+ UInt32 digest[5]; // Message digest
+ UInt32 countLo; // 64-bit bit count
+ UInt32 countHi;
+ UInt32 data[16]; // SHA data buffer
+ UInt32 slop; // # of bytes saved in data[]
+ };
+
+ Context _context;
+ DigestEngine::Digest _digest;
+
+ SHA1Engine(const SHA1Engine&);
+ SHA1Engine& operator = (const SHA1Engine&);
+};
+
+
+} // namespace Poco
+
+
+#endif // Foundation_SHA1Engine_INCLUDED