Lines Matching refs:period
40 - (instancetype)initWithDatabase:(FRAIdentityDatabase *)database identityModel:(FRAIdentityModel *)identityModel secretKey:(NSData *)secretKey HMACAlgorithm:(CCHmacAlgorithm)algorithm codeLength:(NSUInteger)codeLength period:(u_int32_t)period {
46 _period = period;
52 + (instancetype)mechanismWithDatabase:(FRAIdentityDatabase *)database identityModel:(FRAIdentityModel *)identityModel secretKey:(NSData *)secretKey HMACAlgorithm:(CCHmacAlgorithm)algorithm codeLength:(NSUInteger)codeLength period:(u_int32_t)period {
53 return [[FRATotpOathMechanism alloc] initWithDatabase:database identityModel:identityModel secretKey:secretKey HMACAlgorithm:algorithm codeLength:codeLength period:period];
64 uint64_t startTimeInSeconds = (now / self.period * self.period);
66 endTime = (startTimeInSeconds + self.period) * 1000;
67 _code = [FRAOathCode hmac:self.algorithm codeLength:self.codeLength key:self.secretKey counter:now/self.period];