sleeping_kangaroo12 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/Rakefile +1 -1
- data/lib/sleeping_kangaroo12/binding.rb +1 -1
- data/lib/sleeping_kangaroo12/digest.rb +4 -2
- data/lib/sleeping_kangaroo12/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78f06d260dbd9fb1a3519e169c2ad485458c052059ab01052f6e69b1ecc9a145
|
4
|
+
data.tar.gz: 386fdd73caa218e6dc8176c20cabf69e771cc2390026bd7863055a67cfeaa622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fd121f2cf9c76cf4132e7f4599a379164773ee66ca576c98f0d0a8e4688b92e06013f64a013fca2d0ae9f3fed795932f23e53a806aa17f631c97579eefa3c49
|
7
|
+
data.tar.gz: 2dc91a661191d1c398904e7633b168437cff077673bed942e5c20065c9c7f6e69d79b4ae6ab8cb3d08967689d4700ead12e5a9d29f89b260f6ab00b29f3740f5
|
data/ext/Rakefile
CHANGED
@@ -48,7 +48,7 @@ file lib_name => FileList['bin/.build/sleeping_kangaroo12.o', xkcp_static_target
|
|
48
48
|
end
|
49
49
|
|
50
50
|
file 'bin/.build/sleeping_kangaroo12.o' => FileList['binding/sleeping_kangaroo12.c', xkcp_static_target] do |t|
|
51
|
-
sh "gcc -Wall -
|
51
|
+
sh "gcc -Wall -O3 -march=native -I./xkcp/bin -c #{t.prerequisites.first} -o #{t.name}"
|
52
52
|
end
|
53
53
|
|
54
54
|
file xkcp_static_target => FileList['bin/.build/Makefile'] do |t|
|
@@ -7,7 +7,7 @@ module SleepingKangaroo12
|
|
7
7
|
extend ::FFI::Library
|
8
8
|
ffi_lib Build::Loader.find('SleepingKangaroo12')
|
9
9
|
|
10
|
-
attach_function :init, :SleepingKangaroo12_Init, [
|
10
|
+
attach_function :init, :SleepingKangaroo12_Init, %i[int], :pointer
|
11
11
|
attach_function :update, :SleepingKangaroo12_Update, %i[pointer pointer size_t], :int
|
12
12
|
attach_function :final, :SleepingKangaroo12_Final, %i[pointer pointer pointer size_t], :int
|
13
13
|
attach_function :destroy, :SleepingKangaroo12_Destroy, %i[pointer], :void
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'base64'
|
4
|
+
require 'ffi'
|
5
|
+
require 'objspace'
|
3
6
|
require_relative 'binding'
|
4
7
|
|
5
8
|
module SleepingKangaroo12
|
@@ -30,14 +33,13 @@ module SleepingKangaroo12
|
|
30
33
|
|
31
34
|
def update(data)
|
32
35
|
raise Finalized if @finalized
|
33
|
-
|
34
36
|
data_size = data.bytesize
|
35
37
|
data_buffer = ::FFI::MemoryPointer.new(:char, data_size)
|
36
38
|
data_buffer.put_bytes(0, data)
|
37
39
|
Binding.update(@native_instance, data_buffer, data_size).tap do |result|
|
38
40
|
raise UpdatingFailed unless result.zero?
|
39
41
|
end
|
40
|
-
|
42
|
+
self
|
41
43
|
end
|
42
44
|
|
43
45
|
def <<(*args, **kwargs)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sleeping_kangaroo12
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sarun Rattanasiri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -350,7 +350,7 @@ licenses:
|
|
350
350
|
- BSD-3-Clause
|
351
351
|
metadata:
|
352
352
|
homepage_uri: https://github.com/the-cave/sleeping-kangaroo12
|
353
|
-
source_code_uri: https://github.com/the-cave/sleeping-kangaroo12/tree/v0.0.
|
353
|
+
source_code_uri: https://github.com/the-cave/sleeping-kangaroo12/tree/v0.0.3
|
354
354
|
post_install_message:
|
355
355
|
rdoc_options: []
|
356
356
|
require_paths:
|