blob: 4f3a42139f0cabcee9c7595da7e7f2bc0dcaa6be [file] [log] [blame]
David Zeuthen81603152020-02-11 22:04:24 -05001/*
2 * Copyright 2019, The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H
18#define ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H
19
20#include <aidl/android/hardware/identity/BnIdentityCredentialStore.h>
21
22namespace aidl::android::hardware::identity {
23
24using ::std::shared_ptr;
25using ::std::string;
26using ::std::vector;
27
28class IdentityCredentialStore : public BnIdentityCredentialStore {
29 public:
30 IdentityCredentialStore() {}
31
32 // The GCM chunk size used by this implementation is 64 KiB.
33 static constexpr size_t kGcmChunkSize = 64 * 1024;
34
35 // Methods from IIdentityCredentialStore follow.
36 ndk::ScopedAStatus getHardwareInformation(HardwareInformation* hardwareInformation) override;
37
38 ndk::ScopedAStatus createCredential(
39 const string& docType, bool testCredential,
40 shared_ptr<IWritableIdentityCredential>* outWritableCredential) override;
41
Jooyung Han17be89b2020-02-21 21:17:06 +090042 ndk::ScopedAStatus getCredential(CipherSuite cipherSuite, const vector<uint8_t>& credentialData,
David Zeuthen81603152020-02-11 22:04:24 -050043 shared_ptr<IIdentityCredential>* outCredential) override;
44};
45
46} // namespace aidl::android::hardware::identity
47
48#endif // ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H