Delete unused class InsecureCryptStringImpl

Bug: webrtc:6424
Change-Id: I966715f3d815d85b3ec46333cea80418944cd4b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135742
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27902}
This commit is contained in:
Niels Möller 2019-05-09 12:57:02 +02:00 committed by Commit Bot
parent 097c1f3d54
commit 952b571a4a
2 changed files with 0 additions and 42 deletions

View file

@ -43,30 +43,4 @@ CryptString::CryptString(const CryptStringImpl& impl) : impl_(impl.Copy()) {}
CryptString::~CryptString() = default;
size_t InsecureCryptStringImpl::GetLength() const {
return password_.size();
}
void InsecureCryptStringImpl::CopyTo(char* dest, bool nullterminate) const {
memcpy(dest, password_.data(), password_.size());
if (nullterminate)
dest[password_.size()] = 0;
}
std::string InsecureCryptStringImpl::UrlEncode() const {
return password_;
}
CryptStringImpl* InsecureCryptStringImpl::Copy() const {
InsecureCryptStringImpl* copy = new InsecureCryptStringImpl;
copy->password() = password_;
return copy;
}
void InsecureCryptStringImpl::CopyRawTo(
std::vector<unsigned char>* dest) const {
dest->resize(password_.size());
memcpy(&dest->front(), password_.data(), password_.size());
}
} // namespace rtc

View file

@ -65,22 +65,6 @@ class CryptString {
std::unique_ptr<const CryptStringImpl> impl_;
};
class InsecureCryptStringImpl : public CryptStringImpl {
public:
std::string& password() { return password_; }
const std::string& password() const { return password_; }
~InsecureCryptStringImpl() override = default;
size_t GetLength() const override;
void CopyTo(char* dest, bool nullterminate) const override;
std::string UrlEncode() const override;
CryptStringImpl* Copy() const override;
void CopyRawTo(std::vector<unsigned char>* dest) const override;
private:
std::string password_;
};
} // namespace rtc
#endif // RTC_BASE_CRYPT_STRING_H_