summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-05 23:38:26 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-08-05 23:38:26 +0200
commitbfd398596afed66754011b6720e5891c4897c858 (patch)
treec82b2c7f107a0eb08b3a31da24f2179759aa105a /spec
parent91d70d775dd11a9ec350ca7f3b6d403fa897aadc (diff)
downloadayk-bfd398596afed66754011b6720e5891c4897c858.zip
ayk-bfd398596afed66754011b6720e5891c4897c858.tar.gz
update jcryption and specs
Diffstat (limited to 'spec')
-rw-r--r--spec/jcryption_spec.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/spec/jcryption_spec.rb b/spec/jcryption_spec.rb
index a974ea1..ce1d174 100644
--- a/spec/jcryption_spec.rb
+++ b/spec/jcryption_spec.rb
@@ -5,22 +5,6 @@ require 'ayk/jcryption'
#
describe JCryption do
#
- describe 'Bignum' do
- it '#to_bytes #from_bytes should work' do
- 0x217962755220666f207463657073612074656577732061207369206d756e676942.should eql Bignum.from_bytes(0x217962755220666f207463657073612074656577732061207369206d756e676942.to_bytes)
- end
- it '#bits' do
- K_BITS = 1024
- k = JCryption.gen_keypair( K_BITS )
- k.n.to_i.bits.should eql k.d.to_i.bits
- k.d.to_i.bits.should eql k.d.to_i.bits
- k.d.to_i.bits.should eql K_BITS
- k.p.to_i.bits.should eql k.q.to_i.bits
- k.q.to_i.bits.should eql k.q.to_i.bits
- k.q.to_i.bits.should eql K_BITS/2
- end
- end
- #
describe 'JCryption' do
it 'should decrypt data' do
data = '50c412c556a9fab55b50bd0d989067b341f9cdbf12ccb65aeb69dbb360a8e0dbd2069d686873b659b1be7a4c78fe631d362dbf538a5298ecaff19f78cd859897a7317c71b51b90e0a8c03e10059b68826bfeb194a4339a0ecc4a571ba9066fcf3504ffe76e07468cbe03337d3cfebd4efe687f5da72bf694dada987cea884180 ac07cc8462ce0f3e23dafe5d19f47eb33024c91de48413a971bf3b88c159090a26933f694d868bad61517a817f57998ed57bcebcd46a4ed8661cec3e24a8cdf21595902c2fd566820382e2d4f2ee7f1f11fa87a760bcecdf46282147d2c3a1afed3797d22296abcc3b1289489e7c265b3b4223bf93cbf0bb5122c021501a4305'