enquo-core 0.6.0-aarch64-linux → 0.6.0.4.gd752e84-aarch64-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: dae7f8d1d26aeda51167f0d5b3139a4280a2d36b2d4246d8fe0233d66216741d
4
- data.tar.gz: de3babdd59b817fedbc2c91c00b1791ab6afeb0166ac0dd19ef3bae09abb7115
3
+ metadata.gz: b11bd7db1deaee73dc3076d65b3e31cdff900fdf4e90d5436649679a1b7e0bfa
4
+ data.tar.gz: a5d0dfb05a4912651d52519cf3d8b46ebc092ebc76b50f97fda550ed2d8dab68
5
5
  SHA512:
6
- metadata.gz: ec6730c6776cd7bc1f0a8a751df90efe782cf732105d4ef0e2d28568d3f1ead62cd9e07b8b34da426fd6bc74955d07ea61b6a83673ccd5e335fea869057fe18f
7
- data.tar.gz: 93fd8401e5489b590b405bf049ead5e31f87716b92d23a56b1bc823c2841a591cc9d2d45fad3079329dff73f2cfcb18c05bb0bb3380b6e43b09c41f6e4824d7a
6
+ metadata.gz: 7490e40ada36ec79237143f6b54b9bd4a397339f0a1480a5157be96fb575acacb475084de00e4e8df5b310bab445a8fbd5528ec36e24be26bcdefc2b93c6b3dd
7
+ data.tar.gz: 8dc913d7b67508c5ba1492533dcfc3bb2a20e1ca8418e5e7b10727c5842d702fbac328303e289e90baa4c9e19d1cbbe8635478c6ea4679ce900a6284aa785609
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ This directory contains the Ruby bindings for the [Enquo](https://enquo.org) core cryptography library.
2
+
3
+ ## Note Well
4
+
5
+ When reading these docs, bear in mind that this is a *low level* cryptographic library.
6
+ It is not intended that most users will use `enquo-core` directly.
7
+ Instead, typically you will use Enquo via your preferred ORM or other higher-level integration.
8
+ This library is intended to be used to build *those* integrations, not to be used in applications directly.
9
+
10
+
11
+ # Installation
12
+
13
+ Typically you'll want to install [the rubygem]:
14
+
15
+ ```bash
16
+ gem install enquo-core
17
+ ```
18
+
19
+ If you use a platform for which pre-built binary packages are available, this will Just Work.
20
+ Otherwise, you'll need a [Rust toolchain](https://www.rust-lang.org/learn/get-started) to build.
21
+
22
+
23
+ # Usage
24
+
25
+ The Enquo core is all about encrypting and decrypting *field data*, using keys derived from a *root*.
26
+
27
+ Load the library:
28
+
29
+ ```ruby
30
+ require "enquo-core"
31
+ ```
32
+
33
+ Create the root key, from which all other cryptographic keys are derived:
34
+
35
+ ```ruby
36
+ root_key = Enquo::RootKey::Static.new(SecureRandom.bytes(32))
37
+ ```
38
+
39
+ (In real-world use, you'll want to take that key from somewhere it can be securely stored)
40
+
41
+ Now, you can create the root itself:
42
+
43
+ ```ruby
44
+ root = Enquo::Root.new(root_key)
45
+ ```
46
+
47
+ Finally, you can now create a "field" object, which is what is used to do encryption and decryption:
48
+
49
+ ```ruby
50
+ f = root.field("some_relation", "some_field_name")
51
+ ciphertext = f.encrypt_text("this is some text", "test")
52
+ puts f.decrypt_text(ciphertext, "test").inspect # Should print "this is some text"
53
+ ```
54
+
55
+ For more details on the full API, consult [the fine manual](https://www.rubydoc.info/gems/enquo-core).
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
@@ -2,23 +2,23 @@ module Enquo
2
2
  module RootKey
3
3
  class Static
4
4
  def self.new(k)
5
- unless k.is_a?(String)
6
- raise ArgumentError, "An Enquo static root key must be passed a string"
7
- end
5
+ unless k.is_a?(String)
6
+ raise ArgumentError, "An Enquo static root key must be passed a string"
7
+ end
8
8
 
9
- key = if k.encoding == Encoding::BINARY
10
- unless k.bytesize == 32
11
- raise ArgumentError, "An Enquo static root key must be a 32 byte binary string"
12
- end
9
+ key = if k.encoding == Encoding::BINARY
10
+ unless k.bytesize == 32
11
+ raise ArgumentError, "An Enquo static root key must be a 32 byte binary string"
12
+ end
13
13
 
14
- k
15
- else
16
- unless k =~ /\A\h{64}\z/
17
- raise ArgumentError, "An Enquo static root key must be a 64 byte hex string"
18
- end
14
+ k
15
+ else
16
+ unless k =~ /\A\h{64}\z/
17
+ raise ArgumentError, "An Enquo static root key must be a 64 byte hex string"
18
+ end
19
19
 
20
- [k].pack("H*")
21
- end
20
+ [k].pack("H*")
21
+ end
22
22
 
23
23
  _new(key)
24
24
  end
data/lib/enquo-core.rb ADDED
@@ -0,0 +1 @@
1
+ require_relative "./enquo.rb"
data/lib/enquo_core.rb ADDED
@@ -0,0 +1 @@
1
+ require_relative "./enquo.rb"
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.6.0
4
+ version: 0.6.0.4.gd752e84
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Matt Palmer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-08 00:00:00.000000000 Z
11
+ date: 2023-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,7 +150,7 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- description:
153
+ description:
154
154
  email:
155
155
  - matt@enquo.org
156
156
  executables: []
@@ -158,6 +158,7 @@ extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - ".gitignore"
161
+ - README.md
161
162
  - enquo-core.gemspec
162
163
  - ext/enquo/.gitignore
163
164
  - ext/enquo/Cargo.lock
@@ -167,11 +168,13 @@ files:
167
168
  - lib/2.7/enquo.so
168
169
  - lib/3.0/enquo.so
169
170
  - lib/3.1/enquo.so
171
+ - lib/enquo-core.rb
170
172
  - lib/enquo.rb
171
173
  - lib/enquo/field.rb
172
174
  - lib/enquo/root.rb
173
175
  - lib/enquo/root_key.rb
174
176
  - lib/enquo/root_key/static.rb
177
+ - lib/enquo_core.rb
175
178
  homepage: https://enquo.org/active_enquo
176
179
  licenses: []
177
180
  metadata:
@@ -179,7 +182,7 @@ metadata:
179
182
  source_code_uri: https://github.com/enquo/enquo-core
180
183
  changelog_uri: https://github.com/enquo/enquo-core/releases
181
184
  bug_tracker_uri: https://github.com/enquo/enquo-core/issues
182
- post_install_message:
185
+ post_install_message:
183
186
  rdoc_options: []
184
187
  require_paths:
185
188
  - lib
@@ -193,12 +196,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
196
  version: 3.2.dev
194
197
  required_rubygems_version: !ruby/object:Gem::Requirement
195
198
  requirements:
196
- - - ">="
199
+ - - ">"
197
200
  - !ruby/object:Gem::Version
198
- version: '0'
201
+ version: 1.3.1
199
202
  requirements: []
200
- rubygems_version: 3.3.22
201
- signing_key:
203
+ rubygems_version: 3.4.3
204
+ signing_key:
202
205
  specification_version: 4
203
206
  summary: Core library for encrypted querying operations
204
207
  test_files: []