TrustCore SDK NanoCrypto API reference  version 7.0
otp.h
Go to the documentation of this file.
1 /*
2  * otp.h
3  *
4  * One-Time-Password and S/Key Header
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
10 
23 #ifndef __OTP_HEADER__
24 #define __OTP_HEADER__
25 
26 /*------------------------------------------------------------------*/
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define OTP_RESULT_SIZE (8)
33 #define OTP_STR_RESULT_SIZE (20)
34 
58 MOC_EXTERN MSTATUS OTP_otp(MOC_HASH(hwAccelDescr hwAccelCtx) ubyte ht_type, const sbyte* seed, const sbyte* pwd, ubyte4 seq, ubyte res[8]);
59 
79 MOC_EXTERN MSTATUS OTP_otpEx(MOC_HASH(hwAccelDescr hwAccelCtx) const sbyte* challenge, const sbyte* pwd, sbyte res[20]);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* __OTP_HEADER__ */
86 
MOC_EXTERN MSTATUS OTP_otp(MOC_HASH(hwAccelDescr hwAccelCtx) ubyte ht_type, const sbyte *seed, const sbyte *pwd, ubyte4 seq, ubyte res[8])
Computes a one-time password.
MOC_EXTERN MSTATUS OTP_otpEx(MOC_HASH(hwAccelDescr hwAccelCtx) const sbyte *challenge, const sbyte *pwd, sbyte res[20])
Computes a one-time password from a challange string.