1 // Copyright (c) 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "quiche/quic/core/crypto/quic_crypter.h" 6 7 #include "absl/strings/string_view.h" 8 9 namespace quic { 10 SetNoncePrefixOrIV(const ParsedQuicVersion & version,absl::string_view nonce_prefix_or_iv)11bool QuicCrypter::SetNoncePrefixOrIV(const ParsedQuicVersion& version, 12 absl::string_view nonce_prefix_or_iv) { 13 if (version.UsesInitialObfuscators()) { 14 return SetIV(nonce_prefix_or_iv); 15 } 16 return SetNoncePrefix(nonce_prefix_or_iv); 17 } 18 19 } // namespace quic 20