fixes #19863; move sha1, md5 to nimble packages for 2.0 (#21702)

* move sha1, md5 to nimble packages

* boot the compiler

* fixes tests

* build the documentation

* fixes docs

* lol, I forgot koch.nim

* add `nimHasChecksums` define

* clone checksums but maybe copying is better

* bump nimble hash

* use ChecksumsStableCommit

* fixes tests

* deprecate them

* fixes paths

* fixes koch
This commit is contained in:
ringabout
2023-05-02 16:49:17 +08:00
committed by GitHub
parent 2844ac8b5e
commit afc30ca879
33 changed files with 80 additions and 91 deletions

View File

@@ -26,6 +26,9 @@ runnableExamples("-r:off"):
b = parseSecureHash("10DFAEBF6BFDBC7939957068E2EFACEC4972933C")
assert a == b, "files don't match"
{.deprecated: "use command `nimble install checksums` and import `checksums/sha1` instead".}
import strutils
from endians import bigEndian32, bigEndian64
@@ -281,4 +284,4 @@ proc `==`*(a, b: SecureHash): bool =
proc isValidSha1Hash*(s: string): bool =
## Checks if a string is a valid sha1 hash sum.
s.len == 40 and allCharsInSet(s, HexDigits)
s.len == 40 and allCharsInSet(s, HexDigits)