| Index: webrtc/rtc_base/cryptstring.h
|
| diff --git a/webrtc/base/cryptstring.h b/webrtc/rtc_base/cryptstring.h
|
| similarity index 97%
|
| copy from webrtc/base/cryptstring.h
|
| copy to webrtc/rtc_base/cryptstring.h
|
| index e1ee309f65cffd9eeef95ee1483fae32ef65c656..b7b6694cf6234d188e7f6cf866e22e33d52d566e 100644
|
| --- a/webrtc/base/cryptstring.h
|
| +++ b/webrtc/rtc_base/cryptstring.h
|
| @@ -8,8 +8,8 @@
|
| * be found in the AUTHORS file in the root of the source tree.
|
| */
|
|
|
| -#ifndef _WEBRTC_BASE_CRYPTSTRING_H_
|
| -#define _WEBRTC_BASE_CRYPTSTRING_H_
|
| +#ifndef WEBRTC_RTC_BASE_CRYPTSTRING_H_
|
| +#define WEBRTC_RTC_BASE_CRYPTSTRING_H_
|
|
|
| #include <string.h>
|
|
|
| @@ -74,7 +74,7 @@ public:
|
| length_ = 0;
|
| storage_[0] = 0;
|
| }
|
| -
|
| +
|
| void Append(const std::string & text) {
|
| Append(text.data(), text.length());
|
| }
|
| @@ -85,7 +85,7 @@ public:
|
| length_ += length;
|
| storage_[length_] = '\0';
|
| }
|
| -
|
| +
|
| void Append(const CryptString * password) {
|
| size_t len = password->GetLength();
|
| EnsureStorage(length_ + len + 1);
|
| @@ -121,7 +121,7 @@ public:
|
|
|
| if (old_capacity) {
|
| memcpy(storage_, old_storage, length_);
|
| -
|
| +
|
| // zero memory in a way that an optimizer won't optimize it out
|
| old_storage[0] = 0;
|
| for (size_t i = 1; i < old_capacity; i++) {
|
| @@ -129,7 +129,7 @@ public:
|
| }
|
| delete[] old_storage;
|
| }
|
| - }
|
| + }
|
|
|
| ~FormatCryptString() {
|
| if (capacity_) {
|
| @@ -164,4 +164,4 @@ class InsecureCryptStringImpl : public CryptStringImpl {
|
|
|
| }
|
|
|
| -#endif // _WEBRTC_BASE_CRYPTSTRING_H_
|
| +#endif // WEBRTC_RTC_BASE_CRYPTSTRING_H_
|
|
|