2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
16 * @file drm_testcore.cpp
17 * @author Kyungwook Tak(k.tak@samsung.com)
19 * @brief Test drm library internal core codes
21 #include "TADC_Util.h"
28 unsigned char in[16] = {
29 0x12, 0x93, 0xe8, 0xf1, 0x28, 0xb3, 0xff, 0x85,
30 0x83, 0xab, 0x8c, 0x1f, 0x7f, 0x9e, 0x15, 0x22
33 char *encoded = Base64Encode(in, sizeof(in));
34 std::cout << "encoded: " << encoded << std::endl;
37 unsigned char *decoded = Base64Decode(encoded, &len);
40 || static_cast<size_t>(len) != sizeof(in)
41 || memcmp(in, decoded, sizeof(in)) != 0) {
42 std::cerr << "input and decoded base64 is different!!" << std::endl;
49 void test_drm_core(void)