enveloperb 0.4.0 → 0.4.0.3.g3168596
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/enveloperb/Cargo.lock +3 -2
- data/ext/enveloperb/Cargo.toml +1 -1
- data/ext/enveloperb/src/lib.rs +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88601fa906f8a1c5ade2fb94bbe056493cf2def17f4dda9a26fe629651076c5d
|
4
|
+
data.tar.gz: 10a75977a38e06e53e605b2f16e31da9b2155e8d8842ff07a96d2b2ba6ee1b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b286a2df6970ed00e59acd5807ca07fdc34a7561f69727324884c4f52014066547d4f3047297c544cb7bb49f8613f3529df4bf2eccf462ae1e51268b77d9e973
|
7
|
+
data.tar.gz: cdfd4e1f2badc7aebc6b989bd777b19edb16391be55a563ab2a4116e3fa9e0a0abaa449e2b0bdc71540266042d7813993f27cb1ad56745f6aa2abc210c124aa9
|
data/ext/enveloperb/Cargo.lock
CHANGED
@@ -567,12 +567,13 @@ dependencies = [
|
|
567
567
|
|
568
568
|
[[package]]
|
569
569
|
name = "envelopers"
|
570
|
-
version = "0.
|
570
|
+
version = "0.5.0"
|
571
571
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
572
|
-
checksum = "
|
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",
|
data/ext/enveloperb/Cargo.toml
CHANGED
data/ext/enveloperb/src/lib.rs
CHANGED
@@ -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
|
4
|
+
version: 0.4.0.3.g3168596
|
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-
|
11
|
+
date: 2022-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|
@@ -235,9 +235,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: 2.7.0
|
236
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
237
|
requirements:
|
238
|
-
- - "
|
238
|
+
- - ">"
|
239
239
|
- !ruby/object:Gem::Version
|
240
|
-
version:
|
240
|
+
version: 1.3.1
|
241
241
|
requirements: []
|
242
242
|
rubygems_version: 3.1.6
|
243
243
|
signing_key:
|