summaryrefslogtreecommitdiffstats
path: root/spec/jcryption_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-06 00:00:07 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-08-06 00:00:07 +0200
commit95fcd722943eff110febe2625f5a2118c34c6112 (patch)
treeac187d36a21ea89090595dd1c8bd0c5ba3fa9004 /spec/jcryption_spec.rb
parentbfd398596afed66754011b6720e5891c4897c858 (diff)
downloadayk-95fcd722943eff110febe2625f5a2118c34c6112.zip
ayk-95fcd722943eff110febe2625f5a2118c34c6112.tar.gz
add JCryption::digest and specs
Diffstat (limited to 'spec/jcryption_spec.rb')
-rw-r--r--spec/jcryption_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/jcryption_spec.rb b/spec/jcryption_spec.rb
index ce1d174..85901de 100644
--- a/spec/jcryption_spec.rb
+++ b/spec/jcryption_spec.rb
@@ -15,6 +15,10 @@ describe JCryption do
h['passwd'].should eql "my_password"
h['timestamp'].should eql "1252937955"
end
+ it 'should digest salted passwd' do
+ d,s = JCryption::digest 'mylovelypasswd'
+ JCryption::digest('mylovelypasswd',s)[0].should == d
+ end
end
end
#