oroku_saki 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +64 -0
- data/Rakefile +14 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/oroku_saki/extconf.rb +3 -0
- data/ext/oroku_saki/memzero.c +114 -0
- data/ext/oroku_saki/memzero.h +23 -0
- data/ext/oroku_saki/oroku_saki.c +41 -0
- data/ext/oroku_saki/oroku_saki.h +7 -0
- data/lib/oroku_saki.rb +31 -0
- data/lib/oroku_saki/string_ext.rb +22 -0
- data/lib/oroku_saki/version.rb +3 -0
- data/oroku_saki.gemspec +31 -0
- metadata +152 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 92e35fcb6b712a4480ed16ad9ded3959f066b08a
|
4
|
+
data.tar.gz: 87979e5935c98d372ab042a1d9aa0ddc36adb13b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6a755589cecf5494141b5e78d5598395fd2b022cdb6a4bdc7f94e59f9119fbb9b1218a84276c75727d32d4e7b75368e88526e8411afd631b5fdac29dbe5ad1ad
|
7
|
+
data.tar.gz: f4be1b4ddbd048c686f956c6d1c884a1f3e62b70b8cbeaa6527e2743b3e28c425967044a74fcdd23eb88229cc997f580d2fdc36b74bcc93da0c49596f6a93072
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at t.pickett66@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Tyler Pickett
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# OrokuSaki
|
2
|
+
|
3
|
+
OrokuSaki, a.k.a. Shredder, is the destroyer of strings and attacker's worst
|
4
|
+
nightmare!
|
5
|
+
|
6
|
+
But seriously, this is a collection of small tools for helping your secrets in
|
7
|
+
crypto applications stay secret.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'oroku_saki'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install oroku_saki
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Immediately zeroing out the memory location of a string you want to protect:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
my_secret = 'super sekret value!!!'
|
31
|
+
OrokuSaki.shred!(my_secret) # => nil
|
32
|
+
puts my_secret # => "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
|
33
|
+
|
34
|
+
second_secret = 'another sekret'
|
35
|
+
# String#shred! delegates to OrokuSaki.shred!
|
36
|
+
second_secret.shred! # => "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
|
37
|
+
```
|
38
|
+
|
39
|
+
Setting a string to be shredded before garbage collection:
|
40
|
+
```ruby
|
41
|
+
my_secret = 'super sekret value!!!'
|
42
|
+
OrokuSaki.shred_later(my_secret) # => nil
|
43
|
+
puts my_secret # => "super sekret value!!!"
|
44
|
+
# A finalizer shreds the str just before it gets collected.
|
45
|
+
|
46
|
+
second_secret = 'another sekret'
|
47
|
+
second_scret.shred_later
|
48
|
+
```
|
49
|
+
|
50
|
+
## Development
|
51
|
+
|
52
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
53
|
+
|
54
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/tpickett66/oroku_saki. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
|
+
|
60
|
+
|
61
|
+
## License
|
62
|
+
|
63
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
64
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
require "rake/extensiontask"
|
7
|
+
|
8
|
+
task :build => :compile
|
9
|
+
|
10
|
+
Rake::ExtensionTask.new("oroku_saki") do |ext|
|
11
|
+
ext.lib_dir = "lib/oroku_saki"
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => [:clobber, :compile, :spec]
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "oroku_saki"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
/* Copyright 2012-2016, Mansour Moufid <mansourmoufid@gmail.com>
|
2
|
+
*
|
3
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
4
|
+
* purpose with or without fee is hereby granted, provided that the above
|
5
|
+
* copyright notice and this permission notice appear in all copies.
|
6
|
+
*
|
7
|
+
* THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
10
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
12
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
13
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
14
|
+
*/
|
15
|
+
|
16
|
+
#include <assert.h>
|
17
|
+
#include <stddef.h>
|
18
|
+
#include <stdint.h>
|
19
|
+
|
20
|
+
#include "memzero.h"
|
21
|
+
|
22
|
+
static const unsigned long int qzero = 0UL;
|
23
|
+
|
24
|
+
/*@ requires \valid((unsigned char *)mem);
|
25
|
+
requires stride > 0;
|
26
|
+
assigns \nothing;
|
27
|
+
*/
|
28
|
+
static size_t
|
29
|
+
offset_align(void *const mem, const size_t stride)
|
30
|
+
{
|
31
|
+
uintptr_t offset = (uintptr_t) mem % stride;
|
32
|
+
if (offset == 0) {
|
33
|
+
return (size_t) 0;
|
34
|
+
} else {
|
35
|
+
return (stride - (size_t) offset);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/*@ requires \valid(p + (0 .. n - 1));
|
40
|
+
assigns *(p + (0 .. n - 1));
|
41
|
+
ensures \forall integer i; 0 <= i < n ==> p[i] == 0;
|
42
|
+
*/
|
43
|
+
static inline void
|
44
|
+
zero_bytes(unsigned char *p, const size_t n)
|
45
|
+
{
|
46
|
+
size_t i;
|
47
|
+
if (n == 0) {
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
p[0] = 0;
|
51
|
+
/*@ loop invariant n;
|
52
|
+
loop invariant i > 0;
|
53
|
+
loop assigns i, p[1 .. n - 1];
|
54
|
+
*/
|
55
|
+
for (i = 1; i < n; i++) {
|
56
|
+
p[i] = p[i - 1];
|
57
|
+
}
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
|
61
|
+
/*@ requires \valid((unsigned char *)mem + (0 .. (n - 1)));
|
62
|
+
ensures \forall integer i; 0 <= i < n
|
63
|
+
==> ((unsigned char *)mem)[i] == 0;
|
64
|
+
*/
|
65
|
+
void *
|
66
|
+
memzero(void *const mem, const size_t n)
|
67
|
+
{
|
68
|
+
size_t i, j;
|
69
|
+
unsigned long int *q;
|
70
|
+
unsigned char *b;
|
71
|
+
|
72
|
+
assert(mem != NULL);
|
73
|
+
|
74
|
+
if (n == 0) {
|
75
|
+
goto done;
|
76
|
+
}
|
77
|
+
|
78
|
+
i = 0;
|
79
|
+
|
80
|
+
if (n - i >= 2 * sizeof(qzero)) {
|
81
|
+
/* Zero bytes up to the first aligned word. */
|
82
|
+
b = mem;
|
83
|
+
b += i;
|
84
|
+
zero_bytes(b, offset_align(b, sizeof(qzero)));
|
85
|
+
i += offset_align(b, sizeof(qzero));
|
86
|
+
b += i;
|
87
|
+
|
88
|
+
/* Zero word by word. */
|
89
|
+
assert(offset_align(b, sizeof(qzero)) == 0);
|
90
|
+
q = (unsigned long int *) b;
|
91
|
+
q[0] = qzero;
|
92
|
+
/*@ loop invariant i;
|
93
|
+
loop invariant n;
|
94
|
+
loop invariant j > 0;
|
95
|
+
loop assigns q[j];
|
96
|
+
*/
|
97
|
+
for (j = 1; j < (n - i) / sizeof(qzero); j++) {
|
98
|
+
q[j] = q[j - 1];
|
99
|
+
}
|
100
|
+
i += j * sizeof(qzero);
|
101
|
+
}
|
102
|
+
|
103
|
+
if (i >= n) {
|
104
|
+
goto done;
|
105
|
+
}
|
106
|
+
|
107
|
+
/* Zero any trailing bytes. */
|
108
|
+
b = mem;
|
109
|
+
b += i;
|
110
|
+
zero_bytes(b, n - i);
|
111
|
+
|
112
|
+
done:
|
113
|
+
return mem;
|
114
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/* Copyright 2012-2016, Mansour Moufid <mansourmoufid@gmail.com>
|
2
|
+
*
|
3
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
4
|
+
* purpose with or without fee is hereby granted, provided that the above
|
5
|
+
* copyright notice and this permission notice appear in all copies.
|
6
|
+
*
|
7
|
+
* THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
10
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
12
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
13
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
14
|
+
*/
|
15
|
+
|
16
|
+
#if !defined(MEMZERO_H)
|
17
|
+
#define MEMZERO_H
|
18
|
+
|
19
|
+
#include <stddef.h>
|
20
|
+
|
21
|
+
void *memzero(void *const, const size_t);
|
22
|
+
|
23
|
+
#endif
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#include "oroku_saki.h"
|
2
|
+
|
3
|
+
/* Zero out the memory housing the passed string.
|
4
|
+
*
|
5
|
+
* This method takes in a string and zeros out the memory it occupies, by design
|
6
|
+
* it does not respect frozen states of strings so make sure you're actually
|
7
|
+
* done with the String before using this method.
|
8
|
+
*
|
9
|
+
* @param [String] str The string to be zeroed out.
|
10
|
+
* @raise [TypeError] When passed something other than a String
|
11
|
+
* @return [nil]
|
12
|
+
*/
|
13
|
+
VALUE oroku_saki_shred_bang(VALUE rb_module, VALUE rb_str) {
|
14
|
+
if (TYPE(rb_str) != T_STRING) {
|
15
|
+
VALUE inspected_obj, obj_class_name;
|
16
|
+
inspected_obj = rb_funcall(rb_str, rb_intern("inspect"), 0);
|
17
|
+
obj_class_name = rb_funcall(
|
18
|
+
rb_funcall(rb_str, rb_intern("class"), 0),
|
19
|
+
rb_intern("name"),
|
20
|
+
0
|
21
|
+
);
|
22
|
+
rb_raise(
|
23
|
+
rb_eTypeError,
|
24
|
+
"OrokuSaki.shred! received %s (%s), expected String!",
|
25
|
+
StringValueCStr(inspected_obj),
|
26
|
+
StringValueCStr(obj_class_name)
|
27
|
+
);
|
28
|
+
}
|
29
|
+
memzero(RSTRING_PTR(rb_str), RSTRING_LEN(rb_str));
|
30
|
+
return Qnil;
|
31
|
+
}
|
32
|
+
|
33
|
+
VALUE rb_mOrokuSaki;
|
34
|
+
|
35
|
+
void
|
36
|
+
Init_oroku_saki(void)
|
37
|
+
{
|
38
|
+
rb_mOrokuSaki = rb_define_module("OrokuSaki");
|
39
|
+
rb_define_singleton_method(rb_mOrokuSaki, "shred!",
|
40
|
+
oroku_saki_shred_bang, 1);
|
41
|
+
}
|
data/lib/oroku_saki.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'oroku_saki/version'
|
2
|
+
require 'oroku_saki/oroku_saki'
|
3
|
+
require 'oroku_saki/string_ext'
|
4
|
+
|
5
|
+
require 'objspace'
|
6
|
+
|
7
|
+
module OrokuSaki
|
8
|
+
STRING_FINALIZER = ->(id) {
|
9
|
+
OrokuSaki.shred!(ObjectSpace._id2ref(id))
|
10
|
+
}
|
11
|
+
private_constant :STRING_FINALIZER
|
12
|
+
|
13
|
+
# Attaches the shred method as a finalizer for the passed string
|
14
|
+
#
|
15
|
+
# Gems working with sensitive data that needs to be returned to the user need
|
16
|
+
# a way to ensure the data gets cleared from memory without user intervention.
|
17
|
+
# Having this finalizer attached ensures the sensitive contents will be zeroed
|
18
|
+
# before the GC reaps the object.
|
19
|
+
#
|
20
|
+
# @param [String] str The string to be shredded befor GC reaping
|
21
|
+
# @return [String] The original string
|
22
|
+
#
|
23
|
+
def self.shred_later(str)
|
24
|
+
if !(String === str)
|
25
|
+
raise TypeError,
|
26
|
+
"OrokuSaki.shred_later received #{str} (#{str.class}), expected String!"
|
27
|
+
end
|
28
|
+
ObjectSpace.define_finalizer(str, STRING_FINALIZER)
|
29
|
+
str
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module OrokuSaki
|
2
|
+
# A handful of extensions included in String to give easy access to the shred
|
3
|
+
# methods.
|
4
|
+
module StringExt
|
5
|
+
# Zero out the receiver
|
6
|
+
#
|
7
|
+
# Delegates to the method with the same name on the {OrokuSaki} method.
|
8
|
+
# @return [nil]
|
9
|
+
def shred!
|
10
|
+
OrokuSaki.shred!(self)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Attach a zeroing finalizer to the receiver
|
14
|
+
#
|
15
|
+
# Delegates to the method with the same name on the {OrokuSaki} method.
|
16
|
+
# @return [self]
|
17
|
+
def shred_later
|
18
|
+
OrokuSaki.shred_later(self)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
String.send(:include, OrokuSaki::StringExt)
|
data/oroku_saki.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'oroku_saki/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "oroku_saki"
|
8
|
+
spec.version = OrokuSaki::VERSION
|
9
|
+
spec.authors = ["Tyler Pickett"]
|
10
|
+
spec.email = ["t.pickett66@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{OrokuSaki, a.k.a. Shredder, is the destroyer of strings and attacker's worst nightmare!}
|
13
|
+
spec.description = "OrokuSaki, a.k.a. Shredder, is a small collection for " \
|
14
|
+
"ensuring the strings used in cryptographic operations remain secret. It is " \
|
15
|
+
"based around a simple memzero C function."
|
16
|
+
spec.homepage = "https://github.com/tpickett66/oroku_saki"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
spec.extensions = ["ext/oroku_saki/extconf.rb"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rake-compiler", "~> 0.9"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency "byebug", "~> 8.2"
|
30
|
+
spec.add_development_dependency "yard", "~> 0.8.7"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: oroku_saki
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tyler Pickett
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake-compiler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: byebug
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '8.2'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '8.2'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.7
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.8.7
|
97
|
+
description: OrokuSaki, a.k.a. Shredder, is a small collection for ensuring the strings
|
98
|
+
used in cryptographic operations remain secret. It is based around a simple memzero
|
99
|
+
C function.
|
100
|
+
email:
|
101
|
+
- t.pickett66@gmail.com
|
102
|
+
executables: []
|
103
|
+
extensions:
|
104
|
+
- ext/oroku_saki/extconf.rb
|
105
|
+
extra_rdoc_files: []
|
106
|
+
files:
|
107
|
+
- ".gitignore"
|
108
|
+
- ".rspec"
|
109
|
+
- ".travis.yml"
|
110
|
+
- CODE_OF_CONDUCT.md
|
111
|
+
- Gemfile
|
112
|
+
- LICENSE.txt
|
113
|
+
- README.md
|
114
|
+
- Rakefile
|
115
|
+
- bin/console
|
116
|
+
- bin/setup
|
117
|
+
- ext/oroku_saki/extconf.rb
|
118
|
+
- ext/oroku_saki/memzero.c
|
119
|
+
- ext/oroku_saki/memzero.h
|
120
|
+
- ext/oroku_saki/oroku_saki.c
|
121
|
+
- ext/oroku_saki/oroku_saki.h
|
122
|
+
- lib/oroku_saki.rb
|
123
|
+
- lib/oroku_saki/string_ext.rb
|
124
|
+
- lib/oroku_saki/version.rb
|
125
|
+
- oroku_saki.gemspec
|
126
|
+
homepage: https://github.com/tpickett66/oroku_saki
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements: []
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.4.5
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: OrokuSaki, a.k.a. Shredder, is the destroyer of strings and attacker's worst
|
150
|
+
nightmare!
|
151
|
+
test_files: []
|
152
|
+
has_rdoc:
|