Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: crypto/symmetric_key.cc

Issue 2934893003: Deleted redundant SymmetricKey::GetRawKey(). (Closed)
Patch Set: Rebased to fix conflict with ToT. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/symmetric_key.h ('k') | crypto/symmetric_key_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/symmetric_key.h" 5 #include "crypto/symmetric_key.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // versa. Note that BoringSSL does not support AES-192. 93 // versa. Note that BoringSSL does not support AES-192.
94 if (raw_key.size() != 128/8 && raw_key.size() != 256/8) 94 if (raw_key.size() != 128/8 && raw_key.size() != 256/8)
95 return nullptr; 95 return nullptr;
96 } 96 }
97 97
98 std::unique_ptr<SymmetricKey> key(new SymmetricKey); 98 std::unique_ptr<SymmetricKey> key(new SymmetricKey);
99 key->key_ = raw_key; 99 key->key_ = raw_key;
100 return key; 100 return key;
101 } 101 }
102 102
103 bool SymmetricKey::GetRawKey(std::string* raw_key) const {
104 *raw_key = key_;
105 return true;
106 }
107
108 SymmetricKey::SymmetricKey() = default; 103 SymmetricKey::SymmetricKey() = default;
109 104
110 } // namespace crypto 105 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/symmetric_key.h ('k') | crypto/symmetric_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698