Skip to content

Commit

Permalink
add tests for SHA256.hashHex
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed May 13, 2018
1 parent e1bb639 commit 518c4fc
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,23 @@ class SHA256Test extends FlatSpec with Matchers {
"B26C6C34383088C705DF262F644BE0C3CA2C2E4319ADF3075397DF5E599F2B754E6AB667C").hex2Bytes) shouldEqual
"0261107E41495C0DDC3850CD205D32896133EDD2ADDEBE7D8E20E01EFD078710".toLowerCase

SHA256.hashHexs(
"04b4d653fcbb4b96000c99343f23b08a44fa306031e0587f9e657ab4a25411",
"29368d7d9bb05cd8afbdf7705a6540d98028236965553f91bf1c5b4f70073f55b55d") shouldEqual
"173BDED8F2A2069C193E63EA30DC8FD20E815EC3642B9C24AD7002C03D1BFB9B".toLowerCase

SHA256.hash("00A6020CF86FECEDEEF8859C172BAA1A15A575BC6F".hex2Bytes) shouldEqual
"9C3AC7CD5D2673694C492CC508D788CBCACCDD357956EBCF10BD6C5BDF67AA5C".toLowerCase

SHA256.hashHex("00A6020CF86FECEDEEF8859C172BAA1A15A575BC6F") shouldEqual
"9C3AC7CD5D2673694C492CC508D788CBCACCDD357956EBCF10BD6C5BDF67AA5C".toLowerCase

SHA256.hash("9C3AC7CD5D2673694C492CC508D788CBCACCDD357956EBCF10BD6C5BDF67AA5C".hex2Bytes) shouldEqual
"27D7CF19837C3D3F713BDB483CB98A00D2917D5039D71348E90ADC68D2399F6D".toLowerCase

SHA256.hashHex("9C3AC7CD5D2673694C492CC508D788CBCACCDD357956EBCF10BD6C5BDF67AA5C") shouldEqual
"27D7CF19837C3D3F713BDB483CB98A00D2917D5039D71348E90ADC68D2399F6D".toLowerCase

SHA256.hash256("00010966776006953D5567439E5E39F86A0D273BEE".hex2Bytes) shouldEqual
"D61967F63C7DD183914A4AE452C9F6AD5D462CE3D277798075B107615C1A8A30".toLowerCase

Expand Down

0 comments on commit 518c4fc

Please sign in to comment.