Skip to content

Commit

Permalink
bump version; add key split function
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed Oct 15, 2020
1 parent 9149eda commit 8363e70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hpke"
version = "0.0.1"
version = "0.0.2-dev"
authors = ["Franziskus Kiefer <[email protected]>"]
edition = "2018"
license = "MPL-2.0"
Expand All @@ -11,6 +11,9 @@ readme = "README.md"
[dependencies]
evercrypt = { version = "0.0.1" }

[patch.crates-io]
evercrypt = { git = "https://github.com/franziskuskiefer/evercrypt-rust" }

[dev-dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ impl HPKEKeyPair {
pub fn get_public_key_ref(&self) -> &HPKEPublicKey {
&self.public_key
}

/// Split the key pair into the two keys
pub fn to_keys(self) -> (HPKEPrivateKey, HPKEPublicKey) {
(self.private_key, self.public_key)
}
}

impl HPKEPrivateKey {
Expand Down

0 comments on commit 8363e70

Please sign in to comment.