diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-05-03 02:53:40 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-05-03 02:53:40 -0400 |
commit | aafefa7f344441c709198e16cd07da11b4651a98 (patch) | |
tree | 70253bada8b8b5541125257706d72b580fc9cea9 /src/locked.rs | |
parent | 1b0b0e9eaa546f50f6916cc631edaaa7dc8442e8 (diff) | |
download | rbw-aafefa7f344441c709198e16cd07da11b4651a98.tar.gz rbw-aafefa7f344441c709198e16cd07da11b4651a98.zip |
also make the agent store decrypted org keys in memory
Diffstat (limited to 'src/locked.rs')
-rw-r--r-- | src/locked.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/locked.rs b/src/locked.rs index 4db0423..3cad927 100644 --- a/src/locked.rs +++ b/src/locked.rs @@ -89,3 +89,17 @@ impl PasswordHash { self.hash.data() } } + +pub struct PrivateKey { + private_key: Vec, +} + +impl PrivateKey { + pub fn new(private_key: Vec) -> Self { + Self { private_key } + } + + pub fn private_key(&self) -> &[u8] { + self.private_key.data() + } +} |