Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Releases: vapor/open-crypto

Crypto 2.1.3

30 May 00:44
95e96b4
Compare
Choose a tag to compare

Fixed:

  • Eliminate warnings for Swift 4.1 (#63).

Crypto 3.1.2

07 May 16:44
1b8c2ba
Compare
Choose a tag to compare

Fixed:

  • Fixed a typo in error messages regarding IV length (#61).

Milestone:
3.1.2

Crypto 3.1.1

26 Apr 02:16
346ae2b
Compare
Choose a tag to compare

Fixed:

  • BCrypt.hash(...) will now throw a more helpful error if the cost value is invalid (#58).

Milestone:
3.1.1

Crypto 3.1.0

20 Apr 18:23
Compare
Choose a tag to compare

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 a String. Previously it returned Data 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

12 Apr 22:29
a5598ab
Compare
Choose a tag to compare

New:

Fixed:

  • Updated to latest LosslessDataConvertible. (#52)

API Docs:
https://api.vapor.codes/crypto/latest/Crypto

Milestone:
3.0.1

Crypto 3.0.0

03 Apr 01:54
Compare
Choose a tag to compare

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

23 Mar 21:25
4c7acb4
Compare
Choose a tag to compare
Crypto 3.0.0 RC 3 Pre-release
Pre-release

New:

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

21 Mar 20:08
Compare
Choose a tag to compare
Crypto 3.0.0 RC 2 Pre-release
Pre-release

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.

Milestone

Crypto 3.0.0 RC 1.1.1

28 Feb 02:49
Compare
Choose a tag to compare
Crypto 3.0.0 RC 1.1.1 Pre-release
Pre-release

Fixed:

  • Throws a nicer error when attempting to create RSA signature with a public key on Linux.

Crypto 3.0.0 RC 1.1

28 Feb 02:03
f510082
Compare
Choose a tag to compare
Crypto 3.0.0 RC 1.1 Pre-release
Pre-release

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") 
}

Milestone