Skip to content

Commit

Permalink
Merge pull request #21 from guzba/ryan
Browse files Browse the repository at this point in the history
0.1.9
  • Loading branch information
guzba authored Jul 8, 2023
2 parents c45f618 + 627455c commit d0c9ad3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crunchy.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.1.8"
version = "0.1.9"
author = "Ryan Oldenburg"
description = "SIMD-optimized hashing, checksums and CRCs"
license = "MIT"
Expand Down
5 changes: 3 additions & 2 deletions src/crunchy/sha256.nim
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ proc pbkdf2*(password, salt: string, iterations: int): array[32, uint8] =
result[i] = result[i] xor buf1[i]

proc toHex*(a: openarray[uint8]): string =
result = newStringOfCap(a.len)
result = newStringOfCap(a.len * 2)
for i in 0 ..< a.len:
result.add toHex(a[i], 2)
result = result.toLowerAscii()
for c in result.mitems:
c = toLowerAscii(c)

when defined(release):
{.pop.}

0 comments on commit d0c9ad3

Please sign in to comment.