1 // Copyright (c) 2012 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.
5 #include "sync/util/data_encryption_win.h"
7 #include "testing/gtest/include/gtest/gtest.h"
12 TEST(SyncDataEncryption
, TestEncryptDecryptOfSampleString
) {
13 std::vector
<uint8
> example(EncryptData("example"));
14 ASSERT_FALSE(example
.empty());
16 ASSERT_TRUE(DecryptData(example
, &result
));
17 ASSERT_TRUE(result
== "example");
20 TEST(SyncDataEncryption
, TestDecryptFailure
) {
21 std::vector
<uint8
> example(0, 0);
23 ASSERT_FALSE(DecryptData(example
, &result
));