diff --git a/Cargo.toml b/Cargo.toml index b5d3940..6e37325 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hpke" -version = "0.0.1" +version = "0.0.2-dev" authors = ["Franziskus Kiefer "] edition = "2018" license = "MPL-2.0" @@ -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"] } diff --git a/src/lib.rs b/src/lib.rs index a01b684..79164d4 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 {