Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
add failing test for large strings, add gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Cooke committed Feb 25, 2010
1 parent 713eb8d commit 01b2ff9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.gem

14 changes: 14 additions & 0 deletions basicssl.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Gem::Specification.new do |s|
s.name = 'basicssl'
s.version = "1.0.0"
s.platform = Gem::Platform::RUBY
s.summary = "Basic encryption and signing wrapper"

s.files = Dir.glob("{lib}/**/*")
s.require_path = 'lib'
s.has_rdoc = false

s.author = "Adam Cooke"
s.email = "adam@atechmedia.com"
s.homepage = "http://github.com/adamcooke/basicssl"
end
7 changes: 5 additions & 2 deletions test/suite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ class BasicSSLTest < Test::Unit::TestCase
end

should "should sign & verify a string" do

raw_string = "testing 123456. kthxbai!"

signature = BasicSSL.sign(@private_key, raw_string)
assert signature.is_a?(String)
assert BasicSSL.verify(@public_key, signature, raw_string)
end

should "encrypt & decrypt a large string" do
raw_string = "A" * 4096
assert BasicSSL.encrypt(@public_key, raw_string).is_a?(String)
end

end

end

0 comments on commit 01b2ff9

Please sign in to comment.