ttcrypt 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/ext/ttcrypt/extconf.rb +4 -1
- data/lib/ttcrypt/version.rb +1 -1
- data/spec/ttcrypt_spec.rb +4 -4
- data/ttcrypt.gemspec +15 -15
- metadata +18 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d459d1b709a1b19f0de89161a8b975a984b7428c
|
4
|
+
data.tar.gz: 6ec5f2056c7020809aba68c30d494f6f045ca133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f544365215bd50f05d1bda3d9bd7197734980b039f5c44d2d03e9b41a97a53a5c099fe8109fd0382952472b5681f5db57df365e03eb1d6789f112baa8adb6a
|
7
|
+
data.tar.gz: ad845bcb8c92b8acb561e77764d9fb46aeb82a61ad0a4f9fffa4855e2c45c3f18963df78bf616b63702cca4219fa5a16d0027f3dcaa6c88fa331de8fbdce7861
|
data/.gitignore
CHANGED
data/ext/ttcrypt/extconf.rb
CHANGED
@@ -47,7 +47,10 @@ else
|
|
47
47
|
$CFLAGS += ' -Wall -W -O3 -g'
|
48
48
|
end
|
49
49
|
|
50
|
-
|
50
|
+
cxx11flag = " --std=c++11"
|
51
|
+
|
52
|
+
$CXXFLAGS = CONFIG["CXXFLAGS"] unless defined?($CXXFLAGS)
|
53
|
+
$CXXFLAGS += cxx11flag unless $CXXFLAGS.include?(cxx11flag)
|
51
54
|
|
52
55
|
if ok
|
53
56
|
create_makefile(extension_name)
|
data/lib/ttcrypt/version.rb
CHANGED
data/spec/ttcrypt_spec.rb
CHANGED
@@ -76,12 +76,12 @@ describe 'rsa-oaep' do
|
|
76
76
|
signature = @key.sign(message, hash_name)
|
77
77
|
signature.length.should == 128
|
78
78
|
signature.encoding.should == Encoding::BINARY
|
79
|
-
@key.verify(message, signature, hash_name).should
|
80
|
-
@key.verify(message+'...', signature, hash_name).should
|
79
|
+
@key.verify(message, signature, hash_name).should be_truthy
|
80
|
+
@key.verify(message+'...', signature, hash_name).should be_falsey
|
81
81
|
bad_signature = signature.clone
|
82
82
|
bad_signature.setbyte(0, bad_signature.getbyte(0) ^ 11)
|
83
|
-
@key.verify(message, bad_signature, hash_name).should
|
84
|
-
@key.verify(message, signature, hash_name).should
|
83
|
+
@key.verify(message, bad_signature, hash_name).should be_falsey
|
84
|
+
@key.verify(message, signature, hash_name).should be_truthy
|
85
85
|
}
|
86
86
|
-> { @key.sign(message, :wrong_hash) }.should raise_error
|
87
87
|
-> { @key.verify(message, 'no matter', :wrong_hash) }.should raise_error
|
data/ttcrypt.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
4
6
|
require 'ttcrypt/version'
|
5
7
|
require 'rake'
|
6
|
-
require "rake/extensiontask"
|
7
|
-
require 'rubygems/package_task'
|
8
8
|
|
9
9
|
spec = Gem::Specification.new do |spec|
|
10
10
|
spec.name = "ttcrypt"
|
@@ -13,7 +13,7 @@ spec = Gem::Specification.new do |spec|
|
|
13
13
|
spec.email = ["real.sergeych@gmail.com"]
|
14
14
|
spec.summary = %q{thrift basic cryptography}
|
15
15
|
spec.description = %q{optimized RSA and other basic cryptography primitives in c++}
|
16
|
-
spec.homepage = ""
|
16
|
+
spec.homepage = "https://github.com/sergeych/ttcrypt"
|
17
17
|
spec.license = "GPL3+"
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -26,22 +26,22 @@ spec = Gem::Specification.new do |spec|
|
|
26
26
|
spec.platform = Gem::Platform::RUBY
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.6"
|
29
|
-
spec.add_development_dependency
|
30
|
-
|
31
|
-
spec.
|
29
|
+
spec.add_development_dependency 'rspec', '~> 2.14', '>= 2.14.0'
|
30
|
+
|
31
|
+
spec.add_dependency 'rake'
|
32
|
+
spec.add_dependency 'rake-compiler'
|
32
33
|
|
33
34
|
spec.requirements << 'GMP, https://gmplib.org'
|
34
35
|
end
|
35
36
|
|
36
|
-
|
37
37
|
# add your default gem packing task
|
38
|
-
Gem::PackageTask.new(spec) do |pkg|
|
39
|
-
end
|
40
|
-
|
41
|
-
Rake::ExtensionTask.new "ttcrypt", spec do |ext|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
38
|
+
# Gem::PackageTask.new(spec) do |pkg|
|
39
|
+
# end
|
40
|
+
|
41
|
+
# Rake::ExtensionTask.new "ttcrypt", spec do |ext|
|
42
|
+
# ext.lib_dir = "lib/ttcrypt"
|
43
|
+
# ext.source_pattern = "*.{c,cpp}"
|
44
|
+
# ext.gem_spec = spec
|
45
|
+
# end
|
46
46
|
|
47
47
|
spec
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttcrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sergeych
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,27 +25,33 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.14'
|
31
34
|
- - ">="
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: 2.14.0
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.14'
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: 2.14.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
48
|
+
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
|
-
type: :
|
54
|
+
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
@@ -53,19 +59,19 @@ dependencies:
|
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: rake-compiler
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
74
|
+
version: '0'
|
69
75
|
description: optimized RSA and other basic cryptography primitives in c++
|
70
76
|
email:
|
71
77
|
- real.sergeych@gmail.com
|
@@ -108,7 +114,7 @@ files:
|
|
108
114
|
- spec/spec_helper.rb
|
109
115
|
- spec/ttcrypt_spec.rb
|
110
116
|
- ttcrypt.gemspec
|
111
|
-
homepage:
|
117
|
+
homepage: https://github.com/sergeych/ttcrypt
|
112
118
|
licenses:
|
113
119
|
- GPL3+
|
114
120
|
metadata: {}
|