From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/webrtc/rtc_base/sha1.h | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 third_party/libwebrtc/webrtc/rtc_base/sha1.h (limited to 'third_party/libwebrtc/webrtc/rtc_base/sha1.h') diff --git a/third_party/libwebrtc/webrtc/rtc_base/sha1.h b/third_party/libwebrtc/webrtc/rtc_base/sha1.h new file mode 100644 index 0000000000..f3242b3498 --- /dev/null +++ b/third_party/libwebrtc/webrtc/rtc_base/sha1.h @@ -0,0 +1,33 @@ +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + * +*/ + +// Ported to C++, Google style, under namespace rtc. + +#ifndef RTC_BASE_SHA1_H_ +#define RTC_BASE_SHA1_H_ + +#include +#include + +namespace rtc { + +struct SHA1_CTX { + uint32_t state[5]; + // TODO: Change bit count to uint64_t. + uint32_t count[2]; // Bit count of input. + uint8_t buffer[64]; +}; + +#define SHA1_DIGEST_SIZE 20 + +void SHA1Init(SHA1_CTX* context); +void SHA1Update(SHA1_CTX* context, const uint8_t* data, size_t len); +void SHA1Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]); + +} // namespace rtc + +#endif // RTC_BASE_SHA1_H_ -- cgit v1.2.3