Fix LCECryptoKit methods

This commit is contained in:
Daniel Arantes Loverde
2025-10-07 20:21:28 -03:00
parent fd9eff5226
commit 9a7981b845
3 changed files with 16 additions and 6 deletions

View File

@@ -31,11 +31,21 @@ public final class LCECrypto {
self.hashKey = privateKey
}
func encodeOTP(email: String, password: String) -> String? {
func encodeTP(email: String, password: String) -> String? {
return LCECryptoKit.encodeSeed(email: email, password: password)
}
func decodeOTP(_ otpHash: String) -> String? {
return LCECryptoKit.decodeSeed(otpKey: otpHash)
}
// MARK: Need hashKey to decode
func encodeOTPWithKey(email: String, password: String) -> String? {
return LCECryptoKit.encodeSeed(email: email, password: password, hashKey: self.hashKey)
}
func decodeOTP(_ otpHash: String) -> Bool {
func decodeOTPWithKey(_ otpHash: String) -> Bool {
LCECryptoKit.decodeSeed(otpKey: otpHash, hashKey: self.hashKey)
}
}