Skip to content

Commit e79b3eb

Browse files
committed
ECDSA.normalize_digest: A better spec for the change in the last commit.
1 parent 5533363 commit e79b3eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/ecdsa_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@
4242
expect { ECDSA.normalize_digest(:a, 1) }.to raise_error ArgumentError,
4343
'Digest must be a string or integer.'
4444
end
45+
46+
it 'normalizes string encoding' do
47+
expect(ECDSA.normalize_digest("\xAB\xCD".force_encoding('UTF-16LE'), 8)).to eq 0xAB
48+
end
4549
end
4650
end

0 commit comments

Comments
 (0)