enveloperb 0.4.0-x86_64-linux → 0.4.0.3.g3168596-x86_64-linux

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: 7960eab91345ed2e21091925631e6aa4f9fa085c81649ff73b1f8e4691cc1271
4
- data.tar.gz: ea3962a525a32b1c3cdf9c548a3b96dea3d2fc9674d1c965b63ebe2fed0fd713
3
+ metadata.gz: d6260de72279299f632bddd1adaea1b19df10e06202b75c9cac00f89647b276c
4
+ data.tar.gz: 9ac5a4918b5710060316ae8fec4bdfe8957b8704f6e90ba4b018c396758c64a3
5
5
  SHA512:
6
- metadata.gz: d28ad8079cb6ff72eba7a085b34104794582b307aa62f9dca32cb68712e523723c5eed75cb79c1bac4a455e0ac84b875c88a549a52eff7c06e723d348edb39f9
7
- data.tar.gz: 26f733af7167e0d8c5092affe6aaaab8868c29cb48153881ed3a94639b48481d245557b550f92f0165cec175e597d7814f6789dac706aa2f837b7ea9fc1987c4
6
+ metadata.gz: b974865e7f598477ba8d923eea6b6c9f449f5b13c87f924cd73e54d8a5beb52943594d03cd563e5015fce5e900b54fb94606c0144b23d267260e4209d4619c3c
7
+ data.tar.gz: b29450a4a465181c20827f8bc0a3adc621802610486f3ee0141ba1fa2f089349298a06bb7d024d90fd96e32285b0d63e343cd44d0eb42a0827275a9d35069119
@@ -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);
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.4.0
4
+ version: 0.4.0.3.g3168596
5
5
  platform: x86_64-linux
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
@@ -226,9 +226,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
226
  version: 3.2.dev
227
227
  required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - ">="
229
+ - - ">"
230
230
  - !ruby/object:Gem::Version
231
- version: '0'
231
+ version: 1.3.1
232
232
  requirements: []
233
233
  rubygems_version: 3.4.0.dev
234
234
  signing_key: