Skip to content

Commit

Permalink
fix readme usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Aug 11, 2022
1 parent f84cfa4 commit 756f641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ No need to import anything, it's reasonable to use directly, like in the example
import scala.scalanative.unsigned._

// basic sha256
sha256.sha256("a string") // ==> Array[UByte](192, 220, 134, 239, 218, 0, 96, 212, 8, 64, 152, 169, 14, 201, 43, 61, 74, 168, 157, 127, 126, 15, 186, 84, 36, 86, 29, 33, 69, 30, 23, 88)
sha256.hash("a string") // ==> Array[UByte](192, 220, 134, 239, 218, 0, 96, 212, 8, 64, 152, 169, 14, 201, 43, 61, 74, 168, 157, 127, 126, 15, 186, 84, 36, 86, 29, 33, 69, 30, 23, 88)
val r = Sha256.sha256(Array[UByte](12.toUByte, 23.toUByte, 244.toUByte, 180.toUByte))
bytes2hex(r) // ==> "c8010c6ca931acf480fab946f52d6abf81de50f797a666017cb4f0347c0974f9"

Expand Down

0 comments on commit 756f641

Please sign in to comment.