This repository has been archived by the owner on Sep 3, 2020. It is now read-only.
Releases: vapor/open-crypto
Releases · vapor/open-crypto
Crypto 2.1.3
Fixed:
- Eliminate warnings for Swift 4.1 (#63).
Crypto 3.1.2
Crypto 3.1.1
Crypto 3.1.0
New:
- BCrypt is now based on a C implementation meaning BCrypt hashes won't take longer for debug builds. (#55)
Fixed:
⚠️ BCrypt.hash(...)
now returns aString
. Previously it returnedData
which was a bug. BCrypt hashes are formatted as UTF-8 encoded Strings and should be returned as such. (#55)
Milestone:
3.1.0
Crypto 3.0.1
New:
- Added
RSAKey.components(...)
, a method for creating RSA keys from component values. (#51) DigestAlgorithm
now conforms toEquatable
(#49)
Fixed:
- Updated to latest
LosslessDataConvertible
. (#52)
API Docs:
https://api.vapor.codes/crypto/latest/Crypto
Milestone:
3.0.1
Crypto 3.0.0
New:
- Added
Cipher
class for encrypting and decrypting data. - Refactored
BCrypt
to make more consistent with other types and minimize API surface.
Docs:
https://docs.vapor.codes/3.0/crypto/getting-started/
API Docs:
https://api.vapor.codes/crypto/3.0.0/Crypto
https://api.vapor.codes/crypto/3.0.0/Random
Milestone:
3.0.0
Crypto 3.0.0 RC 3
New:
- Refactors digest and keyed-digest algorithms to use OpenSSL.
- Removes unused PKDF2.
API Docs:
https://api.vapor.codes/crypto/3.0.0-rc.3/Crypto
Milestone:
3.0.0-rc.3
Crypto 3.0.0 RC 2
New:
- Vapor is now running on Swift NIO!
- Crypto now relies on NIO OpenSSL for RSA. (Planning on rolling this out to other crypto in this package to lower maintenance burden going forward)
- RSA can now parse x509-formatted public key certificates.
On macOS, you must run:
brew install libressl
On Linux, you must run:
apt-get install libssl-dev
Fixed:
- RSA now correctly parses DER-encoded PEM files.
Crypto 3.0.0 RC 1.1.1
Fixed:
- Throws a nicer error when attempting to create RSA signature with a public key on Linux.
Crypto 3.0.0 RC 1.1
New:
- Support for RSA signing and verification.
import Crypto
let privateKey: Data = ...
let publicKey: Data = ...
let plaintext = Data("vapor".utf8)
// sign with private key
let privateRSA = RSA(key: .private2048(privateKey))
let signature = try privateRSA.sign(plaintext)
// verify with public key
let publicRSA = RSA(key: .public2048(publicKey))
if try publicRSA.verify(signature, signs: plaintext) {
print("signature verified")
}