capacitor-community / capacitor-community/sqlite

encryption implementation in UtilsEncryption

Open
#645 0 comments 0 reactions 0 assignees View on GitHub
feature needs: triage
Dominant language
Swift
Stars
661
Forks
158
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe:**
The current encryption implementation in `UtilsEncryption` uses `PBKDF2WithHmacSHA1` to derive the encryption key from a passphrase. SHA-1 is no longer considered secure due to known vulnerabilities and successful collision attacks (e.g., SHAttered). Although PBKDF2 mitigates some of this risk via high iteration counts, using SHA-1 is discouraged in modern cryptographic applications.

**Describe the solution you'd like:**
Update the algorithm from:
```java
private static final String PBKDF2_ALGORITHM = "PBKDF2WithHmacSHA1";

to change private static final String PBKDF2_ALGORITHM = "PBKDF2WithHmacSHA256";

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.