enveloperb 0.3.1.2.gb499423-arm64-darwin → 0.4.0.2.g1c140fa-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c11c2b1cf7d7c0b395d4ad118cf1c24803b58ee4d19aa5567a003a506632ec58
4
- data.tar.gz: 19ec477162be8d41a14dd1126c194cd2f2f627f8542ba9f9024acbdf5be9270b
3
+ metadata.gz: 6929d384cbff42a1e64560c50a67c76e629a3cf56e5d45bcc8b5f308c4f04b85
4
+ data.tar.gz: 0c699f6faba3a895e5c026ab1d528b221c23bbd15f722c799ef9ea2836fc2893
5
5
  SHA512:
6
- metadata.gz: 203f43948a7b68c0119e2b2f262247d936da1e11f1def63354cc26b63806bcbdd39745c8b17062861284921755ba474fc1b7292ae992af3b6a451476131a4427
7
- data.tar.gz: e99cbf83f9998a2f55fec8cb558be42a586810a1c1888dd34fdd9ad871ebdcd34b80bf9ef6d68523088888a1ab7fb0f2633a8401b371cd3dcd3de9d61ddcd488
6
+ metadata.gz: 84a5784e7c313bf1710f3a7c50aa5c263a8dda4339aff7488a34a65e7ebeccd8800192e4e83cc135d731d07e831ba5ad702d75be74c046fb3b3c4d3e7c5de039
7
+ data.tar.gz: 30478b2e68522a7d2f8dcff00e3441cd9b4372d7d415abc648a685c9712244ab8a9408d8acb02c5095124df7b9398c232617c2431e7fdf6e94faae79019aa034
@@ -567,11 +567,13 @@ dependencies = [
567
567
 
568
568
  [[package]]
569
569
  name = "envelopers"
570
- version = "0.3.0"
571
- source = "git+https://github.com/cipherstash/envelopers.git#7bf15d2e417ef23975042c0e6f863b85693024e3"
570
+ version = "0.5.0"
571
+ source = "registry+https://github.com/rust-lang/crates.io-index"
572
+ checksum = "7c3cc2fe803e7f222ba13524bad71c8f99fb4147fec2d088010fa40ffd5c4914"
572
573
  dependencies = [
573
574
  "aes-gcm",
574
575
  "async-trait",
576
+ "aws-config",
575
577
  "aws-sdk-kms",
576
578
  "lru",
577
579
  "rand",
@@ -4,8 +4,7 @@ version = "0.0.0"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
7
- envelopers = { git = "https://github.com/cipherstash/envelopers.git" }
8
- #envelopers = "0.2"
7
+ envelopers = "0.5"
9
8
  lazy_static = "^0.2.2"
10
9
  rb-sys = "0.8.0"
11
10
  rutie = { git = "https://github.com/mpalmer/rutie", branch = "rb_sys" }
@@ -10,7 +10,7 @@ extern crate lazy_static;
10
10
  use aws_config;
11
11
  use aws_sdk_kms;
12
12
  use aws_types;
13
- use envelopers::{CacheOptions, EncryptedRecord, EnvelopeCipher, KMSKeyProvider, SimpleKeyProvider};
13
+ use envelopers::{CacheOptions, EncryptedRecord, EnvelopeCipher, KMSKeyProvider, SimpleKeyProvider, CachingKeyWrapper};
14
14
  use std::borrow::Cow;
15
15
  use tokio::runtime::Runtime;
16
16
  use rutie::{Class, Encoding, Hash, Module, Object, RString, Symbol, VerifiedObject, VM};
@@ -32,12 +32,12 @@ impl VerifiedObject for EnveloperbEncryptedRecord {
32
32
  }
33
33
 
34
34
  pub struct SimpleCipher {
35
- cipher: EnvelopeCipher<SimpleKeyProvider>,
35
+ cipher: EnvelopeCipher<CachingKeyWrapper<SimpleKeyProvider>>,
36
36
  runtime: Runtime,
37
37
  }
38
38
 
39
39
  pub struct AWSKMSCipher {
40
- cipher: EnvelopeCipher<KMSKeyProvider>,
40
+ cipher: EnvelopeCipher<CachingKeyWrapper<KMSKeyProvider>>,
41
41
  runtime: Runtime,
42
42
  }
43
43
 
@@ -55,7 +55,7 @@ methods!(
55
55
  key.clone_from_slice(rbkey.unwrap().to_bytes_unchecked());
56
56
 
57
57
  let provider = SimpleKeyProvider::init(key);
58
- let cipher = EnvelopeCipher::init(provider, CacheOptions::default());
58
+ let cipher = EnvelopeCipher::init(CachingKeyWrapper::new(provider, CacheOptions::default()));
59
59
 
60
60
  let klass = Module::from_existing("Enveloperb").get_nested_class("Simple");
61
61
  return klass.wrap_data(SimpleCipher{ cipher: cipher, runtime: Runtime::new().unwrap() }, &*SIMPLE_CIPHER_WRAPPER);
@@ -121,7 +121,7 @@ methods!(
121
121
 
122
122
  let kmsclient = aws_sdk_kms::Client::new(&kmsclient_config);
123
123
  let provider = KMSKeyProvider::new(kmsclient, rbkey.unwrap().to_string());
124
- let cipher = EnvelopeCipher::init(provider, CacheOptions::default().with_max_bytes(100_000));
124
+ let cipher = EnvelopeCipher::init(CachingKeyWrapper::new(provider, CacheOptions::default().with_max_bytes(100_000)));
125
125
 
126
126
  let klass = Module::from_existing("Enveloperb").get_nested_class("AWSKMS");
127
127
  return klass.wrap_data(AWSKMSCipher{ cipher: cipher, runtime: rt }, &*AWSKMS_CIPHER_WRAPPER);
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enveloperb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.2.gb499423
4
+ version: 0.4.0.2.g1c140fa
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler