1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "credential_info_impl.h" 17 18 namespace OHOS { 19 namespace UserIam { 20 namespace UserAuth { CredentialInfoImpl(int32_t userId,const HdiCredentialInfo & info)21CredentialInfoImpl::CredentialInfoImpl(int32_t userId, const HdiCredentialInfo &info) : userId_(userId), info_(info) 22 { 23 } 24 GetCredentialId() const25uint64_t CredentialInfoImpl::GetCredentialId() const 26 { 27 return info_.credentialId; 28 } 29 GetUserId() const30int32_t CredentialInfoImpl::GetUserId() const 31 { 32 return userId_; 33 } 34 GetExecutorIndex() const35uint64_t CredentialInfoImpl::GetExecutorIndex() const 36 { 37 return info_.executorIndex; 38 } 39 GetTemplateId() const40uint64_t CredentialInfoImpl::GetTemplateId() const 41 { 42 return info_.templateId; 43 } 44 GetAuthType() const45AuthType CredentialInfoImpl::GetAuthType() const 46 { 47 return static_cast<AuthType>(info_.authType); 48 } 49 GetExecutorSensorHint() const50uint32_t CredentialInfoImpl::GetExecutorSensorHint() const 51 { 52 return info_.executorSensorHint; 53 } 54 GetExecutorMatcher() const55uint32_t CredentialInfoImpl::GetExecutorMatcher() const 56 { 57 return info_.executorMatcher; 58 } 59 GetAuthSubType() const60PinSubType CredentialInfoImpl::GetAuthSubType() const 61 { 62 return static_cast<PinSubType>(info_.authSubType); 63 } 64 } // namespace UserAuth 65 } // namespace UserIam 66 } // namespace OHOS