OTP/OTPKit/TOTPCode.swift

18 lines
356 B
Swift
Raw Normal View History

2021-08-24 22:19:31 +00:00
//
// TOTPCode.swift
// OTPKit
//
// Created by Shadowfacts on 8/21/21.
//
import Foundation
public struct TOTPCode: Equatable, Hashable {
public let code: String
public let validFrom: Date
public let validInterval: Int // seconds
public var validUntil: Date {
validFrom.addingTimeInterval(TimeInterval(validInterval))
}
}