Skip to content

Dev#195

Merged
abolfazlbeh merged 6 commits intomainfrom
dev
Dec 1, 2025
Merged

Dev#195
abolfazlbeh merged 6 commits intomainfrom
dev

Conversation

@abolfazlbeh
Copy link
Contributor

No description provided.

Replace `rand::thread_rng()` with `rand::rngs::OsRng` for entropy
generation in mnemonic creation functions.

`thread_rng()` relies on thread-local storage which may not work
reliably on iOS/Android static library targets. `OsRng` directly
uses the OS-provided CSPRNG (SecRandomCopyBytes on iOS/macOS,
getrandom on Linux/Android) which is more portable.

Affected functions:
- Mnemonic::generate()
- generate_mnemonic_in_language()

Bumps khodpay-bip39 to v0.4.0
…chain

fix(bip39): use OsRng for mobile/static library compatibility
@abolfazlbeh abolfazlbeh self-assigned this Dec 1, 2025
Replace `rand::thread_rng()` with `rand::rngs::OsRng` for entropy
generation in mnemonic creation functions.

`thread_rng()` relies on thread-local storage which may not work
reliably on iOS/Android static library targets. `OsRng` directly
uses the OS-provided CSPRNG (SecRandomCopyBytes on iOS/macOS,
getrandom on Linux/Android) which is more portable.

Affected functions:
- Mnemonic::generate()
- generate_mnemonic_in_language()

Bumps khodpay-bip39 to v0.4.0
…chain

fix(bip39): use OsRng for mobile/static library compatibility
Replace `rand::thread_rng()` with `rand::rngs::OsRng` for entropy
generation in mnemonic creation functions.

`thread_rng()` relies on thread-local storage which may not work
reliably on iOS/Android static library targets. `OsRng` directly
uses the OS-provided CSPRNG (SecRandomCopyBytes on iOS/macOS,
getrandom on Linux/Android) which is more portable.

Affected functions:
- Mnemonic::generate()
- generate_mnemonic_in_language()

Bumps khodpay-bip39 to v0.4.0
…chain

fix(bip39): use OsRng for mobile/static library compatibility
@abolfazlbeh abolfazlbeh merged commit 7923e4a into main Dec 1, 2025
11 checks passed
@abolfazlbeh abolfazlbeh deleted the dev branch December 1, 2025 15:12
@abolfazlbeh abolfazlbeh restored the dev branch December 1, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant