enquo-core 0.1.0-aarch64-linux → 0.1.0.4.gdb566eb-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/enquo/Cargo.lock +12 -2
- data/ext/enquo/src/lib.rs +7 -3
- data/lib/2.7/enquo.so +0 -0
- data/lib/3.0/enquo.so +0 -0
- data/lib/3.1/enquo.so +0 -0
- data/lib/enquo/field.rb +2 -2
- 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: 7c28d078e9d6a46b5999b5d37fd868fdc84f3776b1f3e3eb6b09b69773ce125b
|
4
|
+
data.tar.gz: 0f4be9b8a9ad8e820ce8979c68f63c61c0d573b20c94f2ac2491053d4048a372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3711503ff0ca7a7c7d1ec9248b92f9b86f720ee04922555adec3f8c78cde30971bf17c4495031bc042263305052f83bfc88f94fb599615611d679f1ae5a20a22
|
7
|
+
data.tar.gz: 3b35dcde64abe990f3c11e7cd1e3ba286ad7f0be21cbb5c04b6f5c5159dbd95932db8dbcec6835623ff7fa0d1f007c6fef85d7fafa639623fc15a2d2473a645f
|
data/ext/enquo/Cargo.lock
CHANGED
@@ -211,9 +211,9 @@ dependencies = [
|
|
211
211
|
|
212
212
|
[[package]]
|
213
213
|
name = "cretrit"
|
214
|
-
version = "0.
|
214
|
+
version = "0.2.0"
|
215
215
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
216
|
-
checksum = "
|
216
|
+
checksum = "4df4760922c5f3dd56f84699b523b2aa6ce0b4b82845eff8eb4efc3e642dadf0"
|
217
217
|
dependencies = [
|
218
218
|
"aes",
|
219
219
|
"cmac",
|
@@ -293,6 +293,7 @@ dependencies = [
|
|
293
293
|
"hmac",
|
294
294
|
"rand_chacha",
|
295
295
|
"serde",
|
296
|
+
"serde_bytes",
|
296
297
|
"sha2",
|
297
298
|
"thiserror",
|
298
299
|
]
|
@@ -666,6 +667,15 @@ dependencies = [
|
|
666
667
|
"serde_derive",
|
667
668
|
]
|
668
669
|
|
670
|
+
[[package]]
|
671
|
+
name = "serde_bytes"
|
672
|
+
version = "0.11.7"
|
673
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
674
|
+
checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b"
|
675
|
+
dependencies = [
|
676
|
+
"serde",
|
677
|
+
]
|
678
|
+
|
669
679
|
[[package]]
|
670
680
|
name = "serde_derive"
|
671
681
|
version = "1.0.144"
|
data/ext/enquo/src/lib.rs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
extern crate rutie;
|
3
3
|
|
4
4
|
use enquo_core::{Field, Root, I64};
|
5
|
-
use rutie::{Class, Integer, Module, Object, RString, VerifiedObject, VM};
|
5
|
+
use rutie::{Boolean, Class, Integer, Module, Object, RString, VerifiedObject, VM};
|
6
6
|
|
7
7
|
class!(EnquoRoot);
|
8
8
|
class!(EnquoRootKeyStatic);
|
@@ -81,12 +81,16 @@ impl VerifiedObject for EnquoRootKeyStatic {
|
|
81
81
|
methods!(
|
82
82
|
EnquoField,
|
83
83
|
rbself,
|
84
|
-
fn enquo_field_encrypt_i64(value: Integer, context: RString) -> RString {
|
84
|
+
fn enquo_field_encrypt_i64(value: Integer, context: RString, unsafe_parts: Boolean) -> RString {
|
85
85
|
let i = value.unwrap().to_i64();
|
86
86
|
let field = rbself.get_data(&*FIELD_WRAPPER);
|
87
87
|
|
88
88
|
let res = maybe_raise(
|
89
|
-
|
89
|
+
if unsafe_parts.unwrap().to_bool() {
|
90
|
+
I64::new_with_unsafe_parts(i, &context.unwrap().to_vec_u8_unchecked(), field)
|
91
|
+
} else {
|
92
|
+
I64::new(i, &context.unwrap().to_vec_u8_unchecked(), field)
|
93
|
+
},
|
90
94
|
"Failed to create encrypted i64",
|
91
95
|
);
|
92
96
|
RString::new_utf8(&serde_json::to_string(&res).unwrap())
|
data/lib/2.7/enquo.so
CHANGED
Binary file
|
data/lib/3.0/enquo.so
CHANGED
Binary file
|
data/lib/3.1/enquo.so
CHANGED
Binary file
|
data/lib/enquo/field.rb
CHANGED
@@ -4,7 +4,7 @@ module Enquo
|
|
4
4
|
raise RuntimeError, "Enquo::Field cannot be instantiated directly; use Enquo::Crypto#field instead"
|
5
5
|
end
|
6
6
|
|
7
|
-
def encrypt_i64(i, ctx)
|
7
|
+
def encrypt_i64(i, ctx, safety: nil)
|
8
8
|
unless i.is_a?(Integer)
|
9
9
|
raise ArgumentError, "Enquo::Field#encrypt_i64 can only encrypt integers"
|
10
10
|
end
|
@@ -17,7 +17,7 @@ module Enquo
|
|
17
17
|
raise ArgumentError, "Encryption context must be a string (got a #{ctx.class})"
|
18
18
|
end
|
19
19
|
|
20
|
-
_encrypt_i64(i, ctx)
|
20
|
+
_encrypt_i64(i, ctx, safety == :unsafe)
|
21
21
|
end
|
22
22
|
|
23
23
|
def decrypt_i64(data, ctx)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enquo-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0.4.gdb566eb
|
5
5
|
platform: aarch64-linux
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -193,9 +193,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: 3.2.dev
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- - "
|
196
|
+
- - ">"
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
198
|
+
version: 1.3.1
|
199
199
|
requirements: []
|
200
200
|
rubygems_version: 3.3.22
|
201
201
|
signing_key:
|