enveloperb 0.4.0.1.g3e88b4f → 0.4.0.2.g1c140fa

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: '09244f571b8327809228207aa5d4f3b8afd4fb4cf6349322892072d9ed49b183'
4
- data.tar.gz: 5969db1f999cad890cf480491d142db0ed10bc51fa50b150a2e0210e8d6176a9
3
+ metadata.gz: 73076641bdd3bab42b2c5c825f73ce29cbbc70fe13035cb02e88d6c8c10a5963
4
+ data.tar.gz: 4b2ac50a6ecc6d45198cc9fcccb4dab52d98f080e2bbe7968a38177c29d3819c
5
5
  SHA512:
6
- metadata.gz: 1e87cb46b8cd5f3e11ad3b6dac086f7ba7a6ccf5e4ac5235a357a6e6488bbe205b12bca40e3584f62a55ecbda3af94ed4ab63b0aede830d90eda7838256abf66
7
- data.tar.gz: 99faf7705d503988dd95df0ebe31386ffd68a75d914ca2c7e3ea9fe853141c315a081f822d61c9db349b2caee268120db604c5604485267d9ae6b8da3c17729d
6
+ metadata.gz: f14136c3626fdbcc9ff1d822d2fbd9cd8b10d6a184c22e71dc9d952aa73595ae6c851cd77f5be8f3809b1dad3c8b78a7b4af51b31240cbed08b16fe39a11fc08
7
+ data.tar.gz: b1c321df9e2bad1c1eb35e0fe234a1fce363e8ede70803d83f04174de8c73e87e7164f67e1c597325a32304591a7ba27de243dfea384133f019a0c209e30163e
@@ -567,12 +567,13 @@ dependencies = [
567
567
 
568
568
  [[package]]
569
569
  name = "envelopers"
570
- version = "0.3.0"
570
+ version = "0.5.0"
571
571
  source = "registry+https://github.com/rust-lang/crates.io-index"
572
- checksum = "f61714237566bf60718166f12f0c3da4646a5dd0dd9b9ca6f20948e38aabc391"
572
+ checksum = "7c3cc2fe803e7f222ba13524bad71c8f99fb4147fec2d088010fa40ffd5c4914"
573
573
  dependencies = [
574
574
  "aes-gcm",
575
575
  "async-trait",
576
+ "aws-config",
576
577
  "aws-sdk-kms",
577
578
  "lru",
578
579
  "rand",
@@ -4,7 +4,7 @@ version = "0.0.0"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
7
- envelopers = "0.3"
7
+ envelopers = "0.5"
8
8
  lazy_static = "^0.2.2"
9
9
  rb-sys = "0.8.0"
10
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);
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.4.0.1.g3e88b4f
4
+ version: 0.4.0.2.g1c140fa
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-20 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: rb_sys