mirror of
https://github.com/apple/swift-crypto
synced 2026-11-22 04:30:39 +00:00
Add support for creating RSA private keys from encrypted PEM files. ### Checklist - [X] I've run tests to see all new and existing tests pass - [X] I've followed the code style of the rest of the project - [X] I've read the [Contribution Guidelines](CONTRIBUTING.md) - [X] I've updated the documentation if necessary #### If you've made changes to `gyb` files - [ ] I've run `./scripts/generate_boilerplate_files_with_gyb.sh` and included updated generated files in a commit of this pull request ### Motivation: Resolves #264 ### Modifications: Adds an initializer to `_RSA.Signing.PrivateKey` that takes the encrypted PEM representation and the encryption password and calls the high-level BoringSSL function to parse the encrypted key format. Tests were copied from #318 by @ptoffy. ### Result: RSA private keys can be created from encrypted PEM files.