11 Commits

Author SHA1 Message Date
560efd2c8b Merge pull request 'Added more options' (#4) from feature/LCECryptoKit into main
Reviewed-on: https://loverde_git.localhost:3334/Loverde-Company-LTDA/LCEssentials/pulls/4
2025-10-07 23:35:46 +00:00
7e24bdf3d5 Merge branch 'main' into feature/LCECryptoKit 2025-10-07 23:35:37 +00:00
Daniel Arantes Loverde
5df2499c4a Added more options 2025-10-07 20:34:33 -03:00
53ac2c7001 Merge pull request 'Fix LCECryptoKit methods' (#3) from feature/LCECryptoKit into main
Reviewed-on: https://loverde_git.localhost:3334/Loverde-Company-LTDA/LCEssentials/pulls/3
2025-10-07 23:22:04 +00:00
d909709254 Merge branch 'main' into feature/LCECryptoKit 2025-10-07 23:21:59 +00:00
Daniel Arantes Loverde
9a7981b845 Fix LCECryptoKit methods 2025-10-07 20:21:28 -03:00
8f3cbc5024 Merge pull request 'New LCECryptoKit version' (#2) from feature/LCECryptoKit into main
Reviewed-on: https://loverde_git.localhost:3334/Loverde-Company-LTDA/LCEssentials/pulls/2
2025-10-07 18:35:29 +00:00
Daniel Arantes Loverde
fd9eff5226 Merge branch 'main' into feature/LCECryptoKit 2025-10-07 15:34:11 -03:00
Daniel Arantes Loverde
7b86616f92 LCECryptoKit new version 2025-10-07 15:06:10 -03:00
Daniel Arantes Loverde
4f84dfb108 Update README.md 2025-09-02 17:28:28 -03:00
729812d20b Merge pull request 'v1.0.1' (#1) from main into feature/LCECryptoKit
Reviewed-on: https://loverde_git.localhost:3334/Loverde-Company-LTDA/LCEssentials/pulls/1
2025-08-25 19:54:37 +00:00
4 changed files with 28 additions and 10 deletions

View File

@@ -1,13 +1,13 @@
{
"originHash" : "c64eb123858a637db7dce26475a35db7adb60ead911617c384beba36afa95bc5",
"originHash" : "57d4d1724511f49da67a759e590ddf12887d65ffb0702ad7a2ff8f6c830c9b78",
"pins" : [
{
"identity" : "lcecryptokitbinary",
"kind" : "remoteSourceControl",
"location" : "https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
"state" : {
"revision" : "2e7850fdb14cacf6bf2eb160f64c3df84cf5b1c4",
"version" : "1.0.0"
"revision" : "2c5c47cebef40a8adc5557d071a35be405c05e30",
"version" : "1.0.2"
}
}
],

View File

@@ -22,7 +22,7 @@ let package = Package(
url: isLocalDevelopment ?
"../LCECryptoKit/PrivateLib/LCECryptoKitBinary" :
"https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git",
exact: "1.0.0"
exact: "1.0.2"
)
],
targets: [

View File

@@ -17,14 +17,14 @@ Installation
#### Swift Package Manager (SPM)
``` swift
dependencies: [
.package(url: "http://git.loverde.com.br:3000/git/LCEssentials.git", .upToNextMajor(from: "1.0.0"))
.package(url: "https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials", .upToNextMajor(from: "1.0.0"))
]
```
You can also add it via XCode SPM editor with URL:
``` swift
http://git.loverde.com.br:3000/git/LCEssentials.git
https://git.loverde.com.br/Loverde-Company-LTDA/LCEssentials
```
## Usage example

View File

@@ -23,19 +23,37 @@
import Foundation
import LCECryptoKit
public final class LCECrypto {
public final class LCECryptoKitManager {
private let hashKey: String
init(privateKey: String){
public init() {
self.hashKey = ""
}
public init(privateKey: String){
self.hashKey = privateKey
}
func encodeOTP(email: String, password: String) -> String? {
public static func generateKey() -> String {
LCECryptoKit.generateRandomAESKeyString()
}
public func encodeTP(email: String, password: String) -> String? {
return LCECryptoKit.encodeSeed(email: email, password: password)
}
public func decodeOTP(_ otpHash: String) -> String? {
return LCECryptoKit.decodeSeed(otpKey: otpHash)
}
// MARK: Need hashKey to decode
public func encodeOTPWithKey(email: String, password: String) -> String? {
return LCECryptoKit.encodeSeed(email: email, password: password, hashKey: self.hashKey)
}
func decodeOTP(_ otpHash: String) -> Bool {
public func decodeOTPWithKey(_ otpHash: String) -> Bool {
LCECryptoKit.decodeSeed(otpKey: otpHash, hashKey: self.hashKey)
}
}