blob: 60b86cc9f80da35961717836040ee124c071c484 [file] [log] [blame]
Dmitry Dementyeva447b3c2017-10-27 23:09:53 -07001/*
2**
3** Copyright 2017, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9** http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
18#include "include/keystore/KeymasterArguments.h"
19#include "keystore_aidl_hidl_marshalling_utils.h"
20
21#include <binder/Parcel.h>
22
23namespace android {
24namespace security {
25namespace keymaster {
26
27using ::android::status_t;
28status_t KeymasterArguments::readFromParcel(const android::Parcel* in) {
29 data_ = keystore::readParamSetFromParcel(*in);
30 return OK;
31};
32
33status_t KeymasterArguments::writeToParcel(android::Parcel* out) const {
34 return keystore::writeParamSetToParcel(data_, out);
35};
36
Janis Danisevskisff3d7f42018-10-08 07:15:09 -070037KeymasterArguments::KeymasterArguments(hardware::hidl_vec<keystore::KeyParameter>&& other)
38 : data_(std::move(other)) {}
39
Shawn Willden0329a822017-12-04 13:55:14 -070040KeymasterArguments::KeymasterArguments(const hardware::hidl_vec<keystore::KeyParameter>& other)
Dmitry Dementyeva447b3c2017-10-27 23:09:53 -070041 : data_(other) {}
42
43} // namespace keymaster
44} // namespace security
45} // namespace android