enquo-core 0.7.0.2.gb37f667-aarch64-linux → 0.7.0.5.gb281772-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 +59 -133
- data/ext/enquo/Cargo.toml +2 -2
- data/ext/enquo/src/field.rs +342 -0
- data/ext/enquo/src/lib.rs +29 -309
- data/ext/enquo/src/root.rs +39 -0
- data/ext/enquo/src/root_key.rs +67 -0
- 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.rb +2 -4
- metadata +5 -6
- data/lib/enquo/field.rb +0 -173
- data/lib/enquo/root.rb +0 -28
- data/lib/enquo/root_key/static.rb +0 -27
- data/lib/enquo/root_key.rb +0 -1
data/lib/enquo/root.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
module Enquo
|
2
|
-
class Root
|
3
|
-
def self.new(key)
|
4
|
-
case key
|
5
|
-
when RootKey::Static
|
6
|
-
_new_from_static_root_key(key)
|
7
|
-
else
|
8
|
-
raise ArgumentError, "key must be a root key provider object (got a #{key.class})"
|
9
|
-
end.tap do |k|
|
10
|
-
# DIRTY HACK ALERT: take a reference to the key so it doesn't get GC'd
|
11
|
-
# If someone can come up with a better way to acheive this, I'm all ears
|
12
|
-
k.instance_variable_set(:@_key, key)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def field(relation, name)
|
17
|
-
if relation.is_a?(Symbol)
|
18
|
-
relation = relation.to_s
|
19
|
-
end
|
20
|
-
|
21
|
-
if name.is_a?(Symbol)
|
22
|
-
name = name.to_s
|
23
|
-
end
|
24
|
-
|
25
|
-
_field(relation, name)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Enquo
|
2
|
-
module RootKey
|
3
|
-
class Static
|
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
|
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
|
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
|
19
|
-
|
20
|
-
[k].pack("H*")
|
21
|
-
end
|
22
|
-
|
23
|
-
_new(key)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/lib/enquo/root_key.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require_relative "./root_key/static"
|