Split PasswordHelpers and move components into Parser

This commit is contained in:
Danny Moesch 2018-12-01 15:52:01 +01:00 committed by Bob Sun
parent d4d8d7267a
commit 6817f61e3b
4 changed files with 52 additions and 20 deletions

View file

@ -1,30 +0,0 @@
//
// PasswordHelpers.swift
// passKit
//
// Created by Danny Moesch on 17.08.18.
// Copyright © 2018 Bob Sun. All rights reserved.
//
import OneTimePassword
public enum OtpType {
case totp, hotp, none
init(token: Token?) {
switch token?.generator.factor {
case .some(.counter):
self = .hotp
case .some(.timer):
self = .totp
default:
self = .none
}
}
}
enum PasswordChange: Int {
case path = 0x01
case content = 0x02
case none = 0x00
}