kesha-0.1.0.1: Haskell implementation of nix-hash

Copyright(c) 2020 Jordan Mackie
LicenseMIT
MaintainerJordan Mackie <contact@jmackie.dev>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Kesha

Description

An implementation of nix-hash.

Synopsis

Documentation

hash :: FilePath -> IO (Either PackError ByteString) Source #

Compute the cryptographic hash of a path using the defaultHashOptions.

The output of hash path should be consistent with that of nix-hash --type sha256 --base32 path.

hashWith :: HashOptions -> FilePath -> IO (Either PackError ByteString) Source #

Compute the cryptographic hash of a path using the given HashOptions.

data HashOptions Source #

Hashing options.

Constructors

HashOptions 

Fields

defaultHashOptions :: HashOptions Source #

Default hashing options.

These are the default options used by most of the Nix tooling (e.g. nix-prefetch-git).

data HashAlgo Source #

Available hash algorithms.

Constructors

MD5 
SHA1 
SHA256 

data HashRepr Source #

Printable hash representations.

Constructors

Base16 
Base32