Remove SrtpTransport MaybeSetKeyParams and ParseKeyParams

which seem unused.

BUG=webrtc:357776213

Change-Id: I346dfecd291474b29a26d20e5bc88a910a38343a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362361
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43021}
diff --git a/pc/srtp_transport.cc b/pc/srtp_transport.cc
index aaf7283..4340f82 100644
--- a/pc/srtp_transport.cc
+++ b/pc/srtp_transport.cc
@@ -399,42 +399,6 @@
   return send_session_->IsExternalAuthActive();
 }
 
-bool SrtpTransport::MaybeSetKeyParams() {
-  if (!send_crypto_suite_ || !recv_crypto_suite_) {
-    return true;
-  }
-
-  return SetRtpParams(*send_crypto_suite_, send_key_.data(),
-                      static_cast<int>(send_key_.size()), std::vector<int>(),
-                      *recv_crypto_suite_, recv_key_.data(),
-                      static_cast<int>(recv_key_.size()), std::vector<int>());
-}
-
-bool SrtpTransport::ParseKeyParams(const std::string& key_params,
-                                   uint8_t* key,
-                                   size_t len) {
-  // example key_params: "inline:YUJDZGVmZ2hpSktMbW9QUXJzVHVWd3l6MTIzNDU2"
-
-  // Fail if key-method is wrong.
-  if (!absl::StartsWith(key_params, "inline:")) {
-    return false;
-  }
-
-  // Fail if base64 decode fails, or the key is the wrong size.
-  std::string key_b64(key_params.substr(7)), key_str;
-  if (!rtc::Base64::Decode(key_b64, rtc::Base64::DO_STRICT, &key_str,
-                           nullptr) ||
-      key_str.size() != len) {
-    return false;
-  }
-
-  memcpy(key, key_str.c_str(), len);
-  // TODO(bugs.webrtc.org/8905): Switch to ZeroOnFreeBuffer for storing
-  // sensitive data.
-  rtc::ExplicitZeroMemory(&key_str[0], key_str.size());
-  return true;
-}
-
 void SrtpTransport::MaybeUpdateWritableState() {
   bool writable = IsWritable(/*rtcp=*/true) && IsWritable(/*rtcp=*/false);
   // Only fire the signal if the writable state changes.
diff --git a/pc/srtp_transport.h b/pc/srtp_transport.h
index ff8b728..baa164e 100644
--- a/pc/srtp_transport.h
+++ b/pc/srtp_transport.h
@@ -141,9 +141,6 @@
 
   bool UnprotectRtcp(void* data, int in_len, int* out_len);
 
-  bool MaybeSetKeyParams();
-  bool ParseKeyParams(const std::string& key_params, uint8_t* key, size_t len);
-
   const std::string content_name_;
 
   std::unique_ptr<cricket::SrtpSession> send_session_;