OTP/OTPKit/TOTPCode.swift

18 lines
356 B
Swift

//
// 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))
}
}