isTOTPPasswordValid (method)
Validates a time-based one-time password.
Syntax
- (BOOL)isTOTPPasswordValid:(NSData*)keySecret :(int)passwordLength :(int)timeInterval :(NSString*)hashAlgorithm :(NSString*)password;
public func isTOTPPasswordValid(_ keySecret: Data, _ passwordLength: Int32, _ timeInterval: Int32, _ hashAlgorithm: String, _ password: String) throws -> Bool
Remarks
Use this method to validate a time-based one-time password (TOTP) by using explicit TOTP parameters. For this method to work, no user details need to be provided in Users collection.
Supported hash algorithms:
SB_MAC_ALGORITHM_HMAC_SHA1 | SHA1 | |
SB_MAC_ALGORITHM_HMAC_SHA256 | SHA256 | |
SB_MAC_ALGORITHM_HMAC_SHA512 | SHA512 |