enquo-core 0.6.0.11.g8d4f25f-x86_64-linux → 0.7.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/enquo-core.gemspec +4 -6
- data/ext/enquo/Cargo.lock +402 -2
- data/ext/enquo/Cargo.toml +1 -1
- data/ext/enquo/src/lib.rs +34 -10
- 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/3.2/enquo.so +0 -0
- data/lib/enquo/field.rb +62 -26
- data/lib/enquo.so +0 -0
- metadata +29 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e993462201b90467dcfa877b0a1f3ac1fe4539e6900a2ab3b551e8e0efcf3a8
|
4
|
+
data.tar.gz: bbd49abd800fc693b4f5dee724ad980c2038bb36969c58267c7186bc30770e6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e73f213151cbd3be9b7f90d4ca77765b8f1b4f0f1e0f1e6ff754880ee0ac4a530f7764138d344de14317e6f5a25f57a2b3ca8475acc3dfec53b38ecb63ab0825
|
7
|
+
data.tar.gz: f44f98600e4117c73ed08471f0d67053f236b9c89d655bc6833d60ea09b41b6653bdc0e167443ba2aba2c2cceb39520873d2c6ab12a0cf13e16d7786b63cb000
|
data/enquo-core.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.authors = ["Matt Palmer"]
|
18
18
|
s.email = ["matt@enquo.org"]
|
19
|
-
|
19
|
+
s.homepage = "https://enquo.org/active_enquo"
|
20
20
|
|
21
21
|
s.metadata["homepage_uri"] = s.homepage
|
22
22
|
s.metadata["source_code_uri"] = "https://github.com/enquo/enquo-core"
|
@@ -24,17 +24,15 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.metadata["bug_tracker_uri"] = "https://github.com/enquo/enquo-core/issues"
|
25
25
|
|
26
26
|
s.files = `git ls-files -z`.split("\0").reject { |f| f =~ /^(G|spec|Rakefile)/ }
|
27
|
-
s.extensions = ["ext/enquo/extconf.rb"]
|
28
27
|
|
29
28
|
s.required_ruby_version = ">= 2.7.0"
|
30
29
|
|
31
|
-
s.add_runtime_dependency 'rb_sys', '~> 0.1'
|
32
|
-
|
33
30
|
s.add_development_dependency 'bundler'
|
34
31
|
s.add_development_dependency 'github-release'
|
35
32
|
s.add_development_dependency 'rake', '~> 13.0'
|
36
|
-
s.add_development_dependency 'rake-compiler', '~> 1.2'
|
37
|
-
s.add_development_dependency 'rake-compiler-dock', '~> 1.
|
33
|
+
s.add_development_dependency 'rake-compiler', '~> 1.2', '>= 1.2.1'
|
34
|
+
s.add_development_dependency 'rake-compiler-dock', '~> 1.3'
|
35
|
+
s.add_development_dependency 'rb_sys', '~> 0.1'
|
38
36
|
s.add_development_dependency 'redcarpet'
|
39
37
|
s.add_development_dependency 'rspec'
|
40
38
|
s.add_development_dependency 'simplecov'
|
data/ext/enquo/Cargo.lock
CHANGED
@@ -47,6 +47,15 @@ dependencies = [
|
|
47
47
|
"memchr",
|
48
48
|
]
|
49
49
|
|
50
|
+
[[package]]
|
51
|
+
name = "android_system_properties"
|
52
|
+
version = "0.1.5"
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
54
|
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
55
|
+
dependencies = [
|
56
|
+
"libc",
|
57
|
+
]
|
58
|
+
|
50
59
|
[[package]]
|
51
60
|
name = "ansi_term"
|
52
61
|
version = "0.12.1"
|
@@ -73,6 +82,12 @@ version = "1.1.0"
|
|
73
82
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
74
83
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
75
84
|
|
85
|
+
[[package]]
|
86
|
+
name = "base64"
|
87
|
+
version = "0.13.1"
|
88
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
89
|
+
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
90
|
+
|
76
91
|
[[package]]
|
77
92
|
name = "bindgen"
|
78
93
|
version = "0.59.2"
|
@@ -111,6 +126,18 @@ dependencies = [
|
|
111
126
|
"generic-array",
|
112
127
|
]
|
113
128
|
|
129
|
+
[[package]]
|
130
|
+
name = "bumpalo"
|
131
|
+
version = "3.12.0"
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
133
|
+
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
|
134
|
+
|
135
|
+
[[package]]
|
136
|
+
name = "cc"
|
137
|
+
version = "1.0.79"
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
139
|
+
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
140
|
+
|
114
141
|
[[package]]
|
115
142
|
name = "cexpr"
|
116
143
|
version = "0.6.0"
|
@@ -126,6 +153,19 @@ version = "1.0.0"
|
|
126
153
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
127
154
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
128
155
|
|
156
|
+
[[package]]
|
157
|
+
name = "chrono"
|
158
|
+
version = "0.4.24"
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
160
|
+
checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
|
161
|
+
dependencies = [
|
162
|
+
"iana-time-zone",
|
163
|
+
"num-integer",
|
164
|
+
"num-traits",
|
165
|
+
"serde",
|
166
|
+
"winapi",
|
167
|
+
]
|
168
|
+
|
129
169
|
[[package]]
|
130
170
|
name = "ciborium"
|
131
171
|
version = "0.2.0"
|
@@ -183,7 +223,7 @@ dependencies = [
|
|
183
223
|
"ansi_term",
|
184
224
|
"atty",
|
185
225
|
"bitflags",
|
186
|
-
"strsim",
|
226
|
+
"strsim 0.8.0",
|
187
227
|
"textwrap",
|
188
228
|
"unicode-width",
|
189
229
|
"vec_map",
|
@@ -200,6 +240,22 @@ dependencies = [
|
|
200
240
|
"digest",
|
201
241
|
]
|
202
242
|
|
243
|
+
[[package]]
|
244
|
+
name = "codespan-reporting"
|
245
|
+
version = "0.11.1"
|
246
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
247
|
+
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
|
248
|
+
dependencies = [
|
249
|
+
"termcolor",
|
250
|
+
"unicode-width",
|
251
|
+
]
|
252
|
+
|
253
|
+
[[package]]
|
254
|
+
name = "core-foundation-sys"
|
255
|
+
version = "0.8.3"
|
256
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
257
|
+
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
|
258
|
+
|
203
259
|
[[package]]
|
204
260
|
name = "cpufeatures"
|
205
261
|
version = "0.2.5"
|
@@ -246,6 +302,85 @@ dependencies = [
|
|
246
302
|
"cipher",
|
247
303
|
]
|
248
304
|
|
305
|
+
[[package]]
|
306
|
+
name = "cxx"
|
307
|
+
version = "1.0.92"
|
308
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
309
|
+
checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72"
|
310
|
+
dependencies = [
|
311
|
+
"cc",
|
312
|
+
"cxxbridge-flags",
|
313
|
+
"cxxbridge-macro",
|
314
|
+
"link-cplusplus",
|
315
|
+
]
|
316
|
+
|
317
|
+
[[package]]
|
318
|
+
name = "cxx-build"
|
319
|
+
version = "1.0.92"
|
320
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
321
|
+
checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613"
|
322
|
+
dependencies = [
|
323
|
+
"cc",
|
324
|
+
"codespan-reporting",
|
325
|
+
"once_cell",
|
326
|
+
"proc-macro2",
|
327
|
+
"quote",
|
328
|
+
"scratch",
|
329
|
+
"syn",
|
330
|
+
]
|
331
|
+
|
332
|
+
[[package]]
|
333
|
+
name = "cxxbridge-flags"
|
334
|
+
version = "1.0.92"
|
335
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
336
|
+
checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97"
|
337
|
+
|
338
|
+
[[package]]
|
339
|
+
name = "cxxbridge-macro"
|
340
|
+
version = "1.0.92"
|
341
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
342
|
+
checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
|
343
|
+
dependencies = [
|
344
|
+
"proc-macro2",
|
345
|
+
"quote",
|
346
|
+
"syn",
|
347
|
+
]
|
348
|
+
|
349
|
+
[[package]]
|
350
|
+
name = "darling"
|
351
|
+
version = "0.14.4"
|
352
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
353
|
+
checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
|
354
|
+
dependencies = [
|
355
|
+
"darling_core",
|
356
|
+
"darling_macro",
|
357
|
+
]
|
358
|
+
|
359
|
+
[[package]]
|
360
|
+
name = "darling_core"
|
361
|
+
version = "0.14.4"
|
362
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
363
|
+
checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
|
364
|
+
dependencies = [
|
365
|
+
"fnv",
|
366
|
+
"ident_case",
|
367
|
+
"proc-macro2",
|
368
|
+
"quote",
|
369
|
+
"strsim 0.10.0",
|
370
|
+
"syn",
|
371
|
+
]
|
372
|
+
|
373
|
+
[[package]]
|
374
|
+
name = "darling_macro"
|
375
|
+
version = "0.14.4"
|
376
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
377
|
+
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
|
378
|
+
dependencies = [
|
379
|
+
"darling_core",
|
380
|
+
"quote",
|
381
|
+
"syn",
|
382
|
+
]
|
383
|
+
|
249
384
|
[[package]]
|
250
385
|
name = "dbl"
|
251
386
|
version = "0.3.2"
|
@@ -294,6 +429,7 @@ dependencies = [
|
|
294
429
|
"rand_chacha",
|
295
430
|
"serde",
|
296
431
|
"serde_bytes",
|
432
|
+
"serde_with",
|
297
433
|
"sha2",
|
298
434
|
"thiserror",
|
299
435
|
"unicode-normalization",
|
@@ -312,6 +448,12 @@ dependencies = [
|
|
312
448
|
"termcolor",
|
313
449
|
]
|
314
450
|
|
451
|
+
[[package]]
|
452
|
+
name = "fnv"
|
453
|
+
version = "1.0.7"
|
454
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
455
|
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
456
|
+
|
315
457
|
[[package]]
|
316
458
|
name = "generic-array"
|
317
459
|
version = "0.14.6"
|
@@ -345,6 +487,12 @@ version = "1.8.2"
|
|
345
487
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
346
488
|
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
347
489
|
|
490
|
+
[[package]]
|
491
|
+
name = "hashbrown"
|
492
|
+
version = "0.12.3"
|
493
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
494
|
+
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
495
|
+
|
348
496
|
[[package]]
|
349
497
|
name = "hermit-abi"
|
350
498
|
version = "0.1.19"
|
@@ -354,6 +502,12 @@ dependencies = [
|
|
354
502
|
"libc",
|
355
503
|
]
|
356
504
|
|
505
|
+
[[package]]
|
506
|
+
name = "hex"
|
507
|
+
version = "0.4.3"
|
508
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
509
|
+
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
510
|
+
|
357
511
|
[[package]]
|
358
512
|
name = "hmac"
|
359
513
|
version = "0.12.1"
|
@@ -369,6 +523,47 @@ version = "2.1.0"
|
|
369
523
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
370
524
|
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
371
525
|
|
526
|
+
[[package]]
|
527
|
+
name = "iana-time-zone"
|
528
|
+
version = "0.1.54"
|
529
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
530
|
+
checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d"
|
531
|
+
dependencies = [
|
532
|
+
"android_system_properties",
|
533
|
+
"core-foundation-sys",
|
534
|
+
"iana-time-zone-haiku",
|
535
|
+
"js-sys",
|
536
|
+
"wasm-bindgen",
|
537
|
+
"windows",
|
538
|
+
]
|
539
|
+
|
540
|
+
[[package]]
|
541
|
+
name = "iana-time-zone-haiku"
|
542
|
+
version = "0.1.1"
|
543
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
544
|
+
checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
|
545
|
+
dependencies = [
|
546
|
+
"cxx",
|
547
|
+
"cxx-build",
|
548
|
+
]
|
549
|
+
|
550
|
+
[[package]]
|
551
|
+
name = "ident_case"
|
552
|
+
version = "1.0.1"
|
553
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
554
|
+
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
555
|
+
|
556
|
+
[[package]]
|
557
|
+
name = "indexmap"
|
558
|
+
version = "1.9.3"
|
559
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
560
|
+
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
561
|
+
dependencies = [
|
562
|
+
"autocfg",
|
563
|
+
"hashbrown",
|
564
|
+
"serde",
|
565
|
+
]
|
566
|
+
|
372
567
|
[[package]]
|
373
568
|
name = "inout"
|
374
569
|
version = "0.1.3"
|
@@ -384,6 +579,15 @@ version = "1.0.3"
|
|
384
579
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
385
580
|
checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
|
386
581
|
|
582
|
+
[[package]]
|
583
|
+
name = "js-sys"
|
584
|
+
version = "0.3.61"
|
585
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
586
|
+
checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
|
587
|
+
dependencies = [
|
588
|
+
"wasm-bindgen",
|
589
|
+
]
|
590
|
+
|
387
591
|
[[package]]
|
388
592
|
name = "lazy_static"
|
389
593
|
version = "1.4.0"
|
@@ -412,6 +616,15 @@ dependencies = [
|
|
412
616
|
"winapi",
|
413
617
|
]
|
414
618
|
|
619
|
+
[[package]]
|
620
|
+
name = "link-cplusplus"
|
621
|
+
version = "1.0.8"
|
622
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
623
|
+
checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
|
624
|
+
dependencies = [
|
625
|
+
"cc",
|
626
|
+
]
|
627
|
+
|
415
628
|
[[package]]
|
416
629
|
name = "log"
|
417
630
|
version = "0.4.17"
|
@@ -646,7 +859,7 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
646
859
|
[[package]]
|
647
860
|
name = "rutie"
|
648
861
|
version = "0.8.4"
|
649
|
-
source = "git+https://github.com/mpalmer/rutie?branch=
|
862
|
+
source = "git+https://github.com/mpalmer/rutie?branch=fixes#b798b15ddfc3ed011de72702bd0124c91fd67c78"
|
650
863
|
dependencies = [
|
651
864
|
"lazy_static",
|
652
865
|
"libc",
|
@@ -659,6 +872,12 @@ version = "1.0.11"
|
|
659
872
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
660
873
|
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
661
874
|
|
875
|
+
[[package]]
|
876
|
+
name = "scratch"
|
877
|
+
version = "1.0.5"
|
878
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
879
|
+
checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
|
880
|
+
|
662
881
|
[[package]]
|
663
882
|
name = "serde"
|
664
883
|
version = "1.0.144"
|
@@ -699,6 +918,34 @@ dependencies = [
|
|
699
918
|
"serde",
|
700
919
|
]
|
701
920
|
|
921
|
+
[[package]]
|
922
|
+
name = "serde_with"
|
923
|
+
version = "2.3.1"
|
924
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
925
|
+
checksum = "85456ffac572dc8826334164f2fb6fb40a7c766aebe195a2a21ee69ee2885ecf"
|
926
|
+
dependencies = [
|
927
|
+
"base64",
|
928
|
+
"chrono",
|
929
|
+
"hex",
|
930
|
+
"indexmap",
|
931
|
+
"serde",
|
932
|
+
"serde_json",
|
933
|
+
"serde_with_macros",
|
934
|
+
"time",
|
935
|
+
]
|
936
|
+
|
937
|
+
[[package]]
|
938
|
+
name = "serde_with_macros"
|
939
|
+
version = "2.3.1"
|
940
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
941
|
+
checksum = "7cbcd6104f8a4ab6af7f6be2a0da6be86b9de3c401f6e86bb856ab2af739232f"
|
942
|
+
dependencies = [
|
943
|
+
"darling",
|
944
|
+
"proc-macro2",
|
945
|
+
"quote",
|
946
|
+
"syn",
|
947
|
+
]
|
948
|
+
|
702
949
|
[[package]]
|
703
950
|
name = "sha2"
|
704
951
|
version = "0.10.5"
|
@@ -722,6 +969,12 @@ version = "0.8.0"
|
|
722
969
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
723
970
|
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
724
971
|
|
972
|
+
[[package]]
|
973
|
+
name = "strsim"
|
974
|
+
version = "0.10.0"
|
975
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
976
|
+
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
977
|
+
|
725
978
|
[[package]]
|
726
979
|
name = "subtle"
|
727
980
|
version = "2.4.1"
|
@@ -789,6 +1042,33 @@ dependencies = [
|
|
789
1042
|
"syn",
|
790
1043
|
]
|
791
1044
|
|
1045
|
+
[[package]]
|
1046
|
+
name = "time"
|
1047
|
+
version = "0.3.20"
|
1048
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1049
|
+
checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
|
1050
|
+
dependencies = [
|
1051
|
+
"itoa",
|
1052
|
+
"serde",
|
1053
|
+
"time-core",
|
1054
|
+
"time-macros",
|
1055
|
+
]
|
1056
|
+
|
1057
|
+
[[package]]
|
1058
|
+
name = "time-core"
|
1059
|
+
version = "0.1.0"
|
1060
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1061
|
+
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
|
1062
|
+
|
1063
|
+
[[package]]
|
1064
|
+
name = "time-macros"
|
1065
|
+
version = "0.2.8"
|
1066
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1067
|
+
checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
|
1068
|
+
dependencies = [
|
1069
|
+
"time-core",
|
1070
|
+
]
|
1071
|
+
|
792
1072
|
[[package]]
|
793
1073
|
name = "tinyvec"
|
794
1074
|
version = "1.6.0"
|
@@ -865,6 +1145,60 @@ version = "0.11.0+wasi-snapshot-preview1"
|
|
865
1145
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
866
1146
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
867
1147
|
|
1148
|
+
[[package]]
|
1149
|
+
name = "wasm-bindgen"
|
1150
|
+
version = "0.2.84"
|
1151
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1152
|
+
checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
|
1153
|
+
dependencies = [
|
1154
|
+
"cfg-if",
|
1155
|
+
"wasm-bindgen-macro",
|
1156
|
+
]
|
1157
|
+
|
1158
|
+
[[package]]
|
1159
|
+
name = "wasm-bindgen-backend"
|
1160
|
+
version = "0.2.84"
|
1161
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1162
|
+
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
|
1163
|
+
dependencies = [
|
1164
|
+
"bumpalo",
|
1165
|
+
"log",
|
1166
|
+
"once_cell",
|
1167
|
+
"proc-macro2",
|
1168
|
+
"quote",
|
1169
|
+
"syn",
|
1170
|
+
"wasm-bindgen-shared",
|
1171
|
+
]
|
1172
|
+
|
1173
|
+
[[package]]
|
1174
|
+
name = "wasm-bindgen-macro"
|
1175
|
+
version = "0.2.84"
|
1176
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1177
|
+
checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
|
1178
|
+
dependencies = [
|
1179
|
+
"quote",
|
1180
|
+
"wasm-bindgen-macro-support",
|
1181
|
+
]
|
1182
|
+
|
1183
|
+
[[package]]
|
1184
|
+
name = "wasm-bindgen-macro-support"
|
1185
|
+
version = "0.2.84"
|
1186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1187
|
+
checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
|
1188
|
+
dependencies = [
|
1189
|
+
"proc-macro2",
|
1190
|
+
"quote",
|
1191
|
+
"syn",
|
1192
|
+
"wasm-bindgen-backend",
|
1193
|
+
"wasm-bindgen-shared",
|
1194
|
+
]
|
1195
|
+
|
1196
|
+
[[package]]
|
1197
|
+
name = "wasm-bindgen-shared"
|
1198
|
+
version = "0.2.84"
|
1199
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1200
|
+
checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
|
1201
|
+
|
868
1202
|
[[package]]
|
869
1203
|
name = "which"
|
870
1204
|
version = "4.3.0"
|
@@ -907,6 +1241,72 @@ version = "0.4.0"
|
|
907
1241
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
908
1242
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
909
1243
|
|
1244
|
+
[[package]]
|
1245
|
+
name = "windows"
|
1246
|
+
version = "0.46.0"
|
1247
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1248
|
+
checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25"
|
1249
|
+
dependencies = [
|
1250
|
+
"windows-targets",
|
1251
|
+
]
|
1252
|
+
|
1253
|
+
[[package]]
|
1254
|
+
name = "windows-targets"
|
1255
|
+
version = "0.42.2"
|
1256
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1257
|
+
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
1258
|
+
dependencies = [
|
1259
|
+
"windows_aarch64_gnullvm",
|
1260
|
+
"windows_aarch64_msvc",
|
1261
|
+
"windows_i686_gnu",
|
1262
|
+
"windows_i686_msvc",
|
1263
|
+
"windows_x86_64_gnu",
|
1264
|
+
"windows_x86_64_gnullvm",
|
1265
|
+
"windows_x86_64_msvc",
|
1266
|
+
]
|
1267
|
+
|
1268
|
+
[[package]]
|
1269
|
+
name = "windows_aarch64_gnullvm"
|
1270
|
+
version = "0.42.2"
|
1271
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1272
|
+
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
1273
|
+
|
1274
|
+
[[package]]
|
1275
|
+
name = "windows_aarch64_msvc"
|
1276
|
+
version = "0.42.2"
|
1277
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1278
|
+
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
1279
|
+
|
1280
|
+
[[package]]
|
1281
|
+
name = "windows_i686_gnu"
|
1282
|
+
version = "0.42.2"
|
1283
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1284
|
+
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
1285
|
+
|
1286
|
+
[[package]]
|
1287
|
+
name = "windows_i686_msvc"
|
1288
|
+
version = "0.42.2"
|
1289
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1290
|
+
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
1291
|
+
|
1292
|
+
[[package]]
|
1293
|
+
name = "windows_x86_64_gnu"
|
1294
|
+
version = "0.42.2"
|
1295
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1296
|
+
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
1297
|
+
|
1298
|
+
[[package]]
|
1299
|
+
name = "windows_x86_64_gnullvm"
|
1300
|
+
version = "0.42.2"
|
1301
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1302
|
+
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
1303
|
+
|
1304
|
+
[[package]]
|
1305
|
+
name = "windows_x86_64_msvc"
|
1306
|
+
version = "0.42.2"
|
1307
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1308
|
+
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
1309
|
+
|
910
1310
|
[[package]]
|
911
1311
|
name = "zeroize"
|
912
1312
|
version = "1.5.7"
|
data/ext/enquo/Cargo.toml
CHANGED
@@ -8,7 +8,7 @@ enquo-core = { path = "../../../rust" }
|
|
8
8
|
lazy_static = "1.0"
|
9
9
|
serde_json = "1.0"
|
10
10
|
rb-sys = "0.8"
|
11
|
-
rutie = { git = "https://github.com/mpalmer/rutie", branch = "
|
11
|
+
rutie = { git = "https://github.com/mpalmer/rutie", branch = "fixes" }
|
12
12
|
|
13
13
|
[lib]
|
14
14
|
crate-type = ["cdylib"]
|
data/ext/enquo/src/lib.rs
CHANGED
@@ -31,7 +31,7 @@ fn maybe_raise<T, E: std::error::Error>(r: Result<T, E>, s: &str) -> T {
|
|
31
31
|
|
32
32
|
unsafe_methods!(
|
33
33
|
EnquoRoot,
|
34
|
-
|
34
|
+
_rbself,
|
35
35
|
fn enquo_root_new_from_static_root_key(root_key_obj: EnquoRootKeyStatic) -> EnquoRoot {
|
36
36
|
let rk = root_key_obj.get_data(&*STATIC_ROOT_KEY_WRAPPER);
|
37
37
|
let root = maybe_raise(Root::new(rk), "Failed to create Enquo::Root");
|
@@ -43,7 +43,7 @@ unsafe_methods!(
|
|
43
43
|
let relation = relation_obj.to_vec_u8_unchecked();
|
44
44
|
let name = name_obj.to_vec_u8_unchecked();
|
45
45
|
|
46
|
-
let root =
|
46
|
+
let root = _rbself.get_data(&*ROOT_WRAPPER);
|
47
47
|
|
48
48
|
let field = maybe_raise(
|
49
49
|
root.field(&relation, &name),
|
@@ -87,7 +87,7 @@ impl VerifiedObject for EnquoRootKeyStatic {
|
|
87
87
|
unsafe_methods!(
|
88
88
|
EnquoField,
|
89
89
|
rbself,
|
90
|
-
fn
|
90
|
+
fn enquo_field_encrypt_boolean(b_obj: RBoolean, context_obj: RString, mode_obj: Symbol) -> RString {
|
91
91
|
let b = b_obj.to_bool();
|
92
92
|
let context = context_obj.to_vec_u8_unchecked();
|
93
93
|
let mode = mode_obj.to_str();
|
@@ -100,7 +100,7 @@ unsafe_methods!(
|
|
100
100
|
} else {
|
101
101
|
Boolean::new(b, &context, field)
|
102
102
|
},
|
103
|
-
"Failed to create encrypted
|
103
|
+
"Failed to create encrypted boolean",
|
104
104
|
);
|
105
105
|
if mode == "no_query" {
|
106
106
|
res.make_unqueryable();
|
@@ -108,7 +108,7 @@ unsafe_methods!(
|
|
108
108
|
|
109
109
|
RString::new_utf8(&maybe_raise(serde_json::to_string(&res), "Failed to JSONify ciphertext"))
|
110
110
|
},
|
111
|
-
fn
|
111
|
+
fn enquo_field_decrypt_boolean(ciphertext_obj: RString, context_obj: RString) -> RBoolean {
|
112
112
|
let ct = ciphertext_obj.to_str_unchecked();
|
113
113
|
let context = context_obj.to_vec_u8_unchecked();
|
114
114
|
|
@@ -119,7 +119,7 @@ unsafe_methods!(
|
|
119
119
|
|
120
120
|
let value = maybe_raise(
|
121
121
|
e_value.decrypt(&context, field),
|
122
|
-
"Failed to decrypt
|
122
|
+
"Failed to decrypt boolean value",
|
123
123
|
);
|
124
124
|
RBoolean::new(value)
|
125
125
|
},
|
@@ -217,7 +217,8 @@ unsafe_methods!(
|
|
217
217
|
fn enquo_field_encrypt_text(
|
218
218
|
text_obj: RString,
|
219
219
|
context_obj: RString,
|
220
|
-
mode_obj: Symbol
|
220
|
+
mode_obj: Symbol,
|
221
|
+
order_code_len_obj: Integer
|
221
222
|
) -> RString {
|
222
223
|
let text = text_obj.to_str();
|
223
224
|
let context = context_obj.to_vec_u8_unchecked();
|
@@ -231,6 +232,15 @@ unsafe_methods!(
|
|
231
232
|
text,
|
232
233
|
&context,
|
233
234
|
field,
|
235
|
+
None,
|
236
|
+
)
|
237
|
+
} else if mode == "orderable" {
|
238
|
+
let order_code_len = order_code_len_obj.to_i64() as u8;
|
239
|
+
Text::new_with_unsafe_parts(
|
240
|
+
text,
|
241
|
+
&context,
|
242
|
+
field,
|
243
|
+
Some(order_code_len),
|
234
244
|
)
|
235
245
|
} else {
|
236
246
|
Text::new(text, &context, field)
|
@@ -238,7 +248,7 @@ unsafe_methods!(
|
|
238
248
|
"Failed to create encrypted date",
|
239
249
|
);
|
240
250
|
if mode == "no_query" {
|
241
|
-
res.make_unqueryable();
|
251
|
+
maybe_raise(res.make_unqueryable(), "Failed to make ciphertext unqueryable");
|
242
252
|
}
|
243
253
|
|
244
254
|
RString::new_utf8(&maybe_raise(serde_json::to_string(&res), "Failed to JSONify ciphertext"))
|
@@ -255,6 +265,16 @@ unsafe_methods!(
|
|
255
265
|
let s = maybe_raise(e_value.decrypt(&context, field), "Failed to decrypt text value");
|
256
266
|
|
257
267
|
RString::new_utf8(&s)
|
268
|
+
},
|
269
|
+
fn enquo_field_encrypt_text_length_query(
|
270
|
+
len_obj: Integer
|
271
|
+
) -> RString {
|
272
|
+
let len = len_obj.to_u32();
|
273
|
+
|
274
|
+
let field = rbself.get_data(&*FIELD_WRAPPER);
|
275
|
+
|
276
|
+
let v_set = maybe_raise(Text::query_length(len, field), "Failed to encrypt length as value set");
|
277
|
+
RString::new_utf8(&maybe_raise(serde_json::to_string(&v_set), "Failed to JSONify value set"))
|
258
278
|
}
|
259
279
|
);
|
260
280
|
|
@@ -274,14 +294,18 @@ pub extern "C" fn Init_enquo() {
|
|
274
294
|
topmod
|
275
295
|
.define_nested_class("Field", None)
|
276
296
|
.define(|fieldklass| {
|
277
|
-
fieldklass.def_private("
|
278
|
-
fieldklass.def_private("
|
297
|
+
fieldklass.def_private("_encrypt_boolean", enquo_field_encrypt_boolean);
|
298
|
+
fieldklass.def_private("_decrypt_boolean", enquo_field_decrypt_boolean);
|
279
299
|
fieldklass.def_private("_encrypt_i64", enquo_field_encrypt_i64);
|
280
300
|
fieldklass.def_private("_decrypt_i64", enquo_field_decrypt_i64);
|
281
301
|
fieldklass.def_private("_encrypt_date", enquo_field_encrypt_date);
|
282
302
|
fieldklass.def_private("_decrypt_date", enquo_field_decrypt_date);
|
283
303
|
fieldklass.def_private("_encrypt_text", enquo_field_encrypt_text);
|
284
304
|
fieldklass.def_private("_decrypt_text", enquo_field_decrypt_text);
|
305
|
+
fieldklass.def_private(
|
306
|
+
"_encrypt_text_length_query",
|
307
|
+
enquo_field_encrypt_text_length_query,
|
308
|
+
);
|
285
309
|
});
|
286
310
|
topmod.define_nested_module("RootKey").define(|rkmod| {
|
287
311
|
rkmod
|
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/3.2/enquo.so
ADDED
Binary file
|
data/lib/enquo/field.rb
CHANGED
@@ -6,45 +6,45 @@ module Enquo
|
|
6
6
|
raise RuntimeError, "Enquo::Field cannot be instantiated directly; use Enquo::Crypto#field instead"
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def encrypt_boolean(b, ctx, safety: true, no_query: false)
|
10
10
|
unless b.is_a?(TrueClass) || b.is_a?(FalseClass)
|
11
|
-
raise ArgumentError, "Enquo::Field#
|
11
|
+
raise ArgumentError, "Enquo::Field#encrypt_boolean can only encrypt booleans (got an instance of #{b.class})"
|
12
12
|
end
|
13
13
|
|
14
14
|
unless ctx.is_a?(String)
|
15
|
-
raise ArgumentError, "Encryption context must be a string (got
|
15
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
_encrypt_boolean(b, ctx, no_query ? :no_query : safety == :unsafe ? :unsafe : :default)
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def decrypt_boolean(data, ctx)
|
22
22
|
unless data.is_a?(String)
|
23
|
-
raise ArgumentError, "Enquo::Field#
|
23
|
+
raise ArgumentError, "Enquo::Field#decrypt_boolean can only decrypt from a string (got an instance of #{data.class})"
|
24
24
|
end
|
25
25
|
|
26
26
|
unless data.encoding == Encoding::UTF_8 && data.valid_encoding?
|
27
|
-
raise ArgumentError, "Enquo::Field#
|
27
|
+
raise ArgumentError, "Enquo::Field#decrypt_boolean can only decrypt validly-encoded UTF-8 strings (got #{data.encoding})"
|
28
28
|
end
|
29
29
|
|
30
30
|
unless ctx.is_a?(String)
|
31
|
-
raise ArgumentError, "Encryption context must be a string (got
|
31
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
32
32
|
end
|
33
33
|
|
34
|
-
|
34
|
+
_decrypt_boolean(data, ctx)
|
35
35
|
end
|
36
36
|
|
37
37
|
def encrypt_i64(i, ctx, safety: true, no_query: false)
|
38
38
|
unless i.is_a?(Integer)
|
39
|
-
raise ArgumentError, "Enquo::Field#encrypt_i64 can only encrypt integers"
|
39
|
+
raise ArgumentError, "Enquo::Field#encrypt_i64 can only encrypt integers (got an instance of #{i.class})"
|
40
40
|
end
|
41
41
|
|
42
|
-
unless i >= -2 ** 63
|
42
|
+
unless i >= -2 ** 63 && i < 2 ** 63
|
43
43
|
raise ArgumentError, "Enquo::Field#encrypt_i64 can only encrypt integers between -2^63 and 2^63-1 (got #{i})"
|
44
44
|
end
|
45
45
|
|
46
46
|
unless ctx.is_a?(String)
|
47
|
-
raise ArgumentError, "Encryption context must be a string (got
|
47
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
48
48
|
end
|
49
49
|
|
50
50
|
_encrypt_i64(i, ctx, no_query ? :no_query : safety == :unsafe ? :unsafe : :default)
|
@@ -52,7 +52,7 @@ module Enquo
|
|
52
52
|
|
53
53
|
def decrypt_i64(data, ctx)
|
54
54
|
unless data.is_a?(String)
|
55
|
-
raise ArgumentError, "Enquo::Field#decrypt_i64 can only decrypt from a string (got #{data.class})"
|
55
|
+
raise ArgumentError, "Enquo::Field#decrypt_i64 can only decrypt from a string (got an instance of #{data.class})"
|
56
56
|
end
|
57
57
|
|
58
58
|
unless data.encoding == Encoding::UTF_8 && data.valid_encoding?
|
@@ -60,7 +60,7 @@ module Enquo
|
|
60
60
|
end
|
61
61
|
|
62
62
|
unless ctx.is_a?(String)
|
63
|
-
raise ArgumentError, "Encryption context must be a string (got
|
63
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
64
64
|
end
|
65
65
|
|
66
66
|
_decrypt_i64(data, ctx)
|
@@ -68,7 +68,7 @@ module Enquo
|
|
68
68
|
|
69
69
|
def encrypt_date(d, ctx, safety: true, no_query: false)
|
70
70
|
unless d.is_a?(Date)
|
71
|
-
raise ArgumentError, "Enquo::Field#encrypt_date can only encrypt Dates"
|
71
|
+
raise ArgumentError, "Enquo::Field#encrypt_date can only encrypt Dates (got an instance of #{d.class})"
|
72
72
|
end
|
73
73
|
|
74
74
|
unless d.year >= -2 ** 15 && d.year < 2 ** 15 - 1
|
@@ -76,7 +76,7 @@ module Enquo
|
|
76
76
|
end
|
77
77
|
|
78
78
|
unless ctx.is_a?(String)
|
79
|
-
raise ArgumentError, "Encryption context must be a string (got
|
79
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
80
80
|
end
|
81
81
|
|
82
82
|
_encrypt_date(d.year, d.month, d.day, ctx, no_query ? :no_query : safety == :unsafe ? :unsafe : :default)
|
@@ -84,7 +84,7 @@ module Enquo
|
|
84
84
|
|
85
85
|
def decrypt_date(data, ctx)
|
86
86
|
unless data.is_a?(String)
|
87
|
-
raise ArgumentError, "Enquo::Field#decrypt_date can only decrypt from a string (got #{data.class})"
|
87
|
+
raise ArgumentError, "Enquo::Field#decrypt_date can only decrypt from a string (got an instance of #{data.class})"
|
88
88
|
end
|
89
89
|
|
90
90
|
unless data.encoding == Encoding::UTF_8 && data.valid_encoding?
|
@@ -92,35 +92,59 @@ module Enquo
|
|
92
92
|
end
|
93
93
|
|
94
94
|
unless ctx.is_a?(String)
|
95
|
-
raise ArgumentError, "Encryption context must be a string (got
|
95
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
96
96
|
end
|
97
97
|
|
98
98
|
_decrypt_date(data, ctx)
|
99
99
|
end
|
100
100
|
|
101
|
-
def encrypt_text(t, ctx, safety: true, no_query: false)
|
101
|
+
def encrypt_text(t, ctx, safety: true, no_query: false, order_prefix_length: nil)
|
102
102
|
unless t.is_a?(String)
|
103
|
-
raise ArgumentError, "Enquo::Field#encrypt_string can only encrypt Strings"
|
103
|
+
raise ArgumentError, "Enquo::Field#encrypt_string can only encrypt Strings (got an instance of #{t.class})"
|
104
104
|
end
|
105
105
|
|
106
|
-
unless t.encoding
|
106
|
+
unless [Encoding::UTF_8, Encoding::US_ASCII].include?(t.encoding)
|
107
107
|
raise ArgumentError, "Enquo::Field#encrypt_string can only encrypt UTF-8 strings (got a string encoding of #{t.encoding})"
|
108
108
|
end
|
109
109
|
|
110
110
|
unless t.valid_encoding?
|
111
|
-
raise ArgumentError, "Enquo::Field#encrypt_string can only encrypt validly-encoded
|
111
|
+
raise ArgumentError, "Enquo::Field#encrypt_string can only encrypt validly-encoded strings"
|
112
112
|
end
|
113
113
|
|
114
114
|
unless ctx.is_a?(String)
|
115
|
-
raise ArgumentError, "Encryption context must be a string (got
|
115
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
116
|
+
end
|
117
|
+
|
118
|
+
unless order_prefix_length.nil?
|
119
|
+
unless safety == :unsafe
|
120
|
+
raise ArgumentError, "Ordering is only supported when the text field is marked unsafe"
|
121
|
+
end
|
122
|
+
|
123
|
+
unless order_prefix_length.is_a?(Integer)
|
124
|
+
raise ArgumentError, "Ordering prefix length must be an integer (got an instance of #{order_prefix_length.class})"
|
125
|
+
end
|
126
|
+
|
127
|
+
unless (1..255).include?(order_prefix_length)
|
128
|
+
raise ArgumentError, "Ordering prefix length must be between 1 and 255 inclusive (got #{order_prefix_length})"
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
mode = if no_query
|
133
|
+
:no_query
|
134
|
+
elsif !order_prefix_length.nil?
|
135
|
+
:orderable
|
136
|
+
elsif safety == :unsafe
|
137
|
+
:unsafe
|
138
|
+
else
|
139
|
+
:default
|
116
140
|
end
|
117
141
|
|
118
|
-
_encrypt_text(t, ctx,
|
142
|
+
_encrypt_text(t, ctx, mode, order_prefix_length)
|
119
143
|
end
|
120
144
|
|
121
145
|
def decrypt_text(data, ctx)
|
122
146
|
unless data.is_a?(String)
|
123
|
-
raise ArgumentError, "Enquo::Field#decrypt_text can only decrypt from a string (got #{data.class})"
|
147
|
+
raise ArgumentError, "Enquo::Field#decrypt_text can only decrypt from a string (got an instance of #{data.class})"
|
124
148
|
end
|
125
149
|
|
126
150
|
unless data.encoding == Encoding::UTF_8 && data.valid_encoding?
|
@@ -128,10 +152,22 @@ module Enquo
|
|
128
152
|
end
|
129
153
|
|
130
154
|
unless ctx.is_a?(String)
|
131
|
-
raise ArgumentError, "Encryption context must be a string (got
|
155
|
+
raise ArgumentError, "Encryption context must be a string (got an instance of #{ctx.class})"
|
132
156
|
end
|
133
157
|
|
134
158
|
_decrypt_text(data, ctx)
|
135
159
|
end
|
160
|
+
|
161
|
+
def encrypt_text_length_query(len)
|
162
|
+
unless len.is_a?(Integer)
|
163
|
+
raise ArgumentError, "Enquo::Field#encrypt_text_length_query can only encrypt integers (got an instance of #{len.class})"
|
164
|
+
end
|
165
|
+
|
166
|
+
unless len >= 0 && len < 2 ** 32
|
167
|
+
raise ArgumentError, "Enquo::Field#encrypt_text_length_query can only encrypt integers between 0 and 2^32-1 (got #{len})"
|
168
|
+
end
|
169
|
+
|
170
|
+
_encrypt_text_length_query(len)
|
171
|
+
end
|
136
172
|
end
|
137
173
|
end
|
data/lib/enquo.so
ADDED
Binary file
|
metadata
CHANGED
@@ -1,30 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enquo-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
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: 2023-
|
11
|
+
date: 2023-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rb_sys
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.1'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.1'
|
27
|
-
force_ruby_platform: false
|
28
13
|
- !ruby/object:Gem::Dependency
|
29
14
|
name: bundler
|
30
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +59,9 @@ dependencies:
|
|
74
59
|
- - "~>"
|
75
60
|
- !ruby/object:Gem::Version
|
76
61
|
version: '1.2'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.2.1
|
77
65
|
type: :development
|
78
66
|
prerelease: false
|
79
67
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -81,20 +69,37 @@ dependencies:
|
|
81
69
|
- - "~>"
|
82
70
|
- !ruby/object:Gem::Version
|
83
71
|
version: '1.2'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.2.1
|
84
75
|
- !ruby/object:Gem::Dependency
|
85
76
|
name: rake-compiler-dock
|
86
77
|
requirement: !ruby/object:Gem::Requirement
|
87
78
|
requirements:
|
88
79
|
- - "~>"
|
89
80
|
- !ruby/object:Gem::Version
|
90
|
-
version: '1.
|
81
|
+
version: '1.3'
|
91
82
|
type: :development
|
92
83
|
prerelease: false
|
93
84
|
version_requirements: !ruby/object:Gem::Requirement
|
94
85
|
requirements:
|
95
86
|
- - "~>"
|
96
87
|
- !ruby/object:Gem::Version
|
97
|
-
version: '1.
|
88
|
+
version: '1.3'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rb_sys
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.1'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.1'
|
98
103
|
- !ruby/object:Gem::Dependency
|
99
104
|
name: redcarpet
|
100
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,8 +174,10 @@ files:
|
|
169
174
|
- lib/2.7/enquo.so
|
170
175
|
- lib/3.0/enquo.so
|
171
176
|
- lib/3.1/enquo.so
|
177
|
+
- lib/3.2/enquo.so
|
172
178
|
- lib/enquo-core.rb
|
173
179
|
- lib/enquo.rb
|
180
|
+
- lib/enquo.so
|
174
181
|
- lib/enquo/field.rb
|
175
182
|
- lib/enquo/root.rb
|
176
183
|
- lib/enquo/root_key.rb
|
@@ -194,12 +201,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
201
|
version: '2.7'
|
195
202
|
- - "<"
|
196
203
|
- !ruby/object:Gem::Version
|
197
|
-
version: 3.
|
204
|
+
version: 3.3.dev
|
198
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
206
|
requirements:
|
200
|
-
- - "
|
207
|
+
- - ">="
|
201
208
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
209
|
+
version: '0'
|
203
210
|
requirements: []
|
204
211
|
rubygems_version: 3.4.4
|
205
212
|
signing_key:
|