summaryrefslogtreecommitdiff
path: root/spec/ruby/library/digest/sha256/reset_spec.rb
blob: 82bb08d35453c5a8a5bc50c331fbb0191b77a41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../shared/constants', __FILE__)

describe "Digest::SHA256#reset" do

  it "returns digest state to initial conditions" do
    cur_digest = Digest::SHA256.new
    cur_digest.update SHA256Constants::Contents
    cur_digest.digest().should_not == SHA256Constants::BlankDigest
    cur_digest.reset
    cur_digest.digest().should == SHA256Constants::BlankDigest
  end

end