[lececryptokit-1.0.3] Bump LCECryptoKitBinary and expose pepper-refactor login primitives
This commit is contained in:
@@ -58,6 +58,28 @@ public final class LCECryptoKitManager {
|
||||
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
||||
LCECryptoKit.decodeSeed(otpKey: otpHash, hashKey: self.hashKey)
|
||||
}
|
||||
|
||||
// MARK: - Salted/Iterated/Peppered Login (atomenta-cryptokit-pepper-refactor-sdd.md)
|
||||
|
||||
public static func generateSalt() -> String {
|
||||
LCECryptoKit.generateSalt()
|
||||
}
|
||||
|
||||
public static func computeClientHash(email: String, password: String, salt: String) -> String {
|
||||
LCECryptoKit.computeClientHash(email: email, password: password, salt: salt)
|
||||
}
|
||||
|
||||
public static func computeLoginBearerToken(userId: String, clientHash: String) -> String? {
|
||||
LCECryptoKit.computeLoginBearerToken(userId: userId, clientHash: clientHash)
|
||||
}
|
||||
|
||||
public static func otpEncode(_ plainText: String) -> String? {
|
||||
LCECryptoKit.otpEncode(plainText)
|
||||
}
|
||||
|
||||
public static func otpDecode(_ otpEncoded: String) -> String? {
|
||||
LCECryptoKit.otpDecode(otpEncoded)
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -92,5 +114,27 @@ public final class LCECryptoKitManager {
|
||||
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
||||
false
|
||||
}
|
||||
|
||||
// MARK: - Salted/Iterated/Peppered Login (atomenta-cryptokit-pepper-refactor-sdd.md)
|
||||
|
||||
public static func generateSalt() -> String {
|
||||
""
|
||||
}
|
||||
|
||||
public static func computeClientHash(email: String, password: String, salt: String) -> String {
|
||||
""
|
||||
}
|
||||
|
||||
public static func computeLoginBearerToken(userId: String, clientHash: String) -> String? {
|
||||
nil
|
||||
}
|
||||
|
||||
public static func otpEncode(_ plainText: String) -> String? {
|
||||
nil
|
||||
}
|
||||
|
||||
public static func otpDecode(_ otpEncoded: String) -> String? {
|
||||
nil
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user