Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors |
[email protected] | 446f73c2 | 2014-05-14 20:47:18 | [diff] [blame] | 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 "components/gcm_driver/system_encryptor.h" | ||||
6 | |||||
Will Harris | 93d0dcd5 | 2023-03-14 23:38:47 | [diff] [blame] | 7 | #include "components/os_crypt/sync/os_crypt.h" |
[email protected] | 446f73c2 | 2014-05-14 20:47:18 | [diff] [blame] | 8 | |
9 | namespace gcm { | ||||
10 | |||||
Sorin Jianu | 8883d29 | 2024-10-09 14:27:40 | [diff] [blame] | 11 | SystemEncryptor::~SystemEncryptor() = default; |
[email protected] | 446f73c2 | 2014-05-14 20:47:18 | [diff] [blame] | 12 | |
13 | bool SystemEncryptor::EncryptString(const std::string& plaintext, | ||||
14 | std::string* ciphertext) { | ||||
edchin | 3398a815 | 2022-05-16 17:23:18 | [diff] [blame] | 15 | return ::OSCrypt::EncryptString(plaintext, ciphertext); |
[email protected] | 446f73c2 | 2014-05-14 20:47:18 | [diff] [blame] | 16 | } |
17 | |||||
18 | bool SystemEncryptor::DecryptString(const std::string& ciphertext, | ||||
19 | std::string* plaintext) { | ||||
edchin | 3398a815 | 2022-05-16 17:23:18 | [diff] [blame] | 20 | return ::OSCrypt::DecryptString(ciphertext, plaintext); |
[email protected] | 446f73c2 | 2014-05-14 20:47:18 | [diff] [blame] | 21 | } |
22 | |||||
23 | } // namespace gcm |