blob: 792c8316f732fa59c5d8a4ee23400769a219ee4a [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
37KeymasterArguments::KeymasterArguments(const hardware::hidl_vec<keymaster::KeyParameter>& other)
38 : data_(other) {}
39
40} // namespace keymaster
41} // namespace security
42} // namespace android