Commit Graph

7 Commits

Author SHA1 Message Date
Anton-Latukha
54ec4855ba
core & remote: refactor (Digest <-> BaseNN) encodeInBase & decodeBase
also rename functions `encodeIn` `decode` to `encodeInBase` `decodeBase`
2020-12-17 00:56:00 +02:00
Richard Marko
9126129372 core: fix tests due to B16.decode changing type 2020-12-14 10:15:25 +01:00
Richard Marko
d82ba9f3a7 Base16/Base32 decoding, props/tests 2020-03-04 10:41:04 +01:00
Shea Levy
8dd4805936
Hash test: Depend on new StorePath module. 2019-03-22 09:42:33 -04:00
Shea Levy
71025ed892
Hash digests: Only export primitives for rendering as hex and base32
The old 'digestText16' was really a special case that doesn't belong
in the hashing module proper.
2019-03-11 02:28:26 -04:00
John Ericson
9bbe54a03b Add test corresponding to builtins.placeholder "foo" in layer above
We were hashing correctly, but base32-ing wrong.
2019-03-10 12:30:26 -04:00
Greg Hale
aeb98a90a8 Add an API and implementation for basic nix hashes
- Define MD5, SHA1 and SHA256 algos
 - Design typclass to handle type-specific hashing behavior
   - hash digest generation
   - printing to base32
 - Differentiate between parts meant to be used outside (by hnix-store-*, hnix)
   and parts meant to be used only internaly (in **.Internal.** modules)
 - Observe that hashing "Hello World" @SHA1 and serializing to base32 gives
   the same hash as the one in the thesis example
   "s23c9fs0v32pf6bhmcph5rbqsyl5ak8a"
2018-11-17 14:35:35 -05:00