Merge pull request '[lececryptokit-1.0.3] Bump LCECryptoKitBinary and expose pepper-refactor login primitives' (#9) from chore/deps/lececryptokit-1.0.3 into main
Reviewed-on: #9
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "33e7d52ad13cf774717778548edb365d33ff62d766d0049165bc8970f19a23ef",
|
"originHash" : "967609fc5437e21be07c4206e2daefc73c3c7522601e64540f0dd5f115b19a6d",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "lcecryptokitbinary",
|
"identity" : "lcecryptokitbinary",
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"location" : "https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
|
"location" : "https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "2c5c47cebef40a8adc5557d071a35be405c05e30",
|
"revision" : "2c5c47cebef40a8adc5557d071a35be405c05e30",
|
||||||
"version" : "1.0.2"
|
"version" : "1.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ let cryptoPackageURL = isLocalDevelopment
|
|||||||
|
|
||||||
let packageDependencies: [Package.Dependency] = enableCryptoBinary
|
let packageDependencies: [Package.Dependency] = enableCryptoBinary
|
||||||
? [
|
? [
|
||||||
.package(url: cryptoPackageURL, exact: "1.0.2")
|
.package(url: cryptoPackageURL, exact: "1.0.3")
|
||||||
]
|
]
|
||||||
: []
|
: []
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,28 @@ public final class LCECryptoKitManager {
|
|||||||
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
||||||
LCECryptoKit.decodeSeed(otpKey: otpHash, hashKey: self.hashKey)
|
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
|
#else
|
||||||
|
|
||||||
@@ -92,5 +114,27 @@ public final class LCECryptoKitManager {
|
|||||||
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
|
||||||
false
|
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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user