Skip to content

Commit

Permalink
feat: re-exporting OpenSSL key structs
Browse files Browse the repository at this point in the history
  • Loading branch information
jo committed May 22, 2022
1 parent d2cdd03 commit 278baaf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Changelog

## v2.1.0 - Re-Exports of OpenSSL Key Structs
Re-exporting OpenSSLs `EcKey` and `Private`/`Public` pkey structs.

## v2.0.0 - Selected Cipher
Back to a flattened version with selected cipher: ECDH P-521 AES-256-CBC.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "webcryptobox"
description = "Convenient opiniated wrappers around OpenSSL to use WebCrypto compatible cryptography."
version = "2.0.0"
version = "2.1.0"
edition = "2021"
documentation = "https://docs.rs/webcryptobox/latest/webcryptobox/"
homepage = "https://github.com/jo/webcryptobox-rs"
Expand Down
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@
//! ```
use openssl::derive::Deriver;
use openssl::ec::{EcGroup, EcKey};
use openssl::ec::EcGroup;
use openssl::error::ErrorStack;
use openssl::nid::Nid;
use openssl::pkey::PKey;
use openssl::pkey::{Private, Public};
use openssl::rand::rand_bytes;
use openssl::sha;
use openssl::symm;

// Default configuration
// re-exports
pub use openssl::ec::EcKey;
pub use openssl::pkey::{Private, Public};

// Cipher configuration
const CURVE: Nid = Nid::SECP521R1;
const CIPHER: fn() -> symm::Cipher = symm::Cipher::aes_256_cbc;
const KEY_LENGTH: usize = 32;
Expand Down

0 comments on commit 278baaf

Please sign in to comment.