https://github.com/prongbang/securebiometricswift
Securing Local Authentication with Keychain for iOS.
https://github.com/prongbang/securebiometricswift
Last synced: 4 months ago
JSON representation
Securing Local Authentication with Keychain for iOS.
- Host: GitHub
- URL: https://github.com/prongbang/securebiometricswift
- Owner: prongbang
- License: mit
- Created: 2022-10-03T03:36:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-11T16:29:41.000Z (almost 3 years ago)
- Last Synced: 2025-03-25T22:52:10.367Z (7 months ago)
- Language: Swift
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SecureBiometricSwift
Securing Local Authentication with Keychain for iOS.
## CocoaPods
```shell
pod 'SecureBiometricSwift'
```## Swift Package Manager
In your `Package.swift` file, add `SecureBiometricSwift` dependency to corresponding targets:
```swift
let package = Package(
dependencies: [
.package(url: "https://github.com/prongbang/SecureBiometricSwift.git", from: "0.0.2"),
],
)
```## How to use
### Privacy `info.plist`
```xml
NSFaceIDUsageDescription
This application wants to access your TouchID or FaceID```
### Biometric + Cryptography
#### Encrypt
```swift
import SecureBiometricSwiftlet secureBiometricSwift = LocalSecureBiometricSwift()
let plainText = "Hello"
let cipherText = secureBiometricSwift.encrypt(plainText: plainText)
```#### Decrypt
```swift
import SecureBiometricSwiftlet secureBiometricSwift = LocalSecureBiometricSwift()
let plainText = secureBiometricSwift.decrypt(cipherText: cipherText)
```