Compare commits
3 Commits
8f3cbc5024
...
53ac2c7001
| Author | SHA1 | Date | |
|---|---|---|---|
| 53ac2c7001 | |||
| d909709254 | |||
|
|
9a7981b845 |
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "0cae429bbd156715149253da2c3f23815f5e41836679a585dd496e0d48155975",
|
"originHash" : "57d4d1724511f49da67a759e590ddf12887d65ffb0702ad7a2ff8f6c830c9b78",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "lcecryptokitbinary",
|
"identity" : "lcecryptokitbinary",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"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" : "efd58c115c41bd8c28a1458a9150778806953bd0",
|
"revision" : "2c5c47cebef40a8adc5557d071a35be405c05e30",
|
||||||
"version" : "1.0.1"
|
"version" : "1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ let package = Package(
|
|||||||
url: isLocalDevelopment ?
|
url: isLocalDevelopment ?
|
||||||
"../LCECryptoKit/PrivateLib/LCECryptoKitBinary" :
|
"../LCECryptoKit/PrivateLib/LCECryptoKitBinary" :
|
||||||
"https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
|
"https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
|
||||||
exact: "1.0.1"
|
exact: "1.0.2"
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
|
|||||||
@@ -31,11 +31,21 @@ public final class LCECrypto {
|
|||||||
self.hashKey = privateKey
|
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)
|
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)
|
LCECryptoKit.decodeSeed(otpKey: otpHash, hashKey: self.hashKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user