.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-hash-convert" "1" "" .RS .PP \fBWarning\fR .br This program is \fB\fBexperimental\fR\fR and its interface is subject to change. .RE .SH Name .LP \f(CRnix hash convert\fR - convert between hash formats .SH Synopsis .LP \f(CRnix hash convert\fR [\fIoption\fR\[u2026]] \fIhashes\fR\[u2026] .SH Examples .IP "\(bu" 3 Convert a hash to \f(CRnix32\fR (a base-32 encoding with a Nix-specific character set). .LP .EX $ nix hash convert --hash-algo sha1 --to nix32 800d59cfcd3c05e900cb4e214be48f6b886a08df vw46m23bizj4n8afrc0fj19wrp7mj3c0 .EE .IP "\(bu" 3 Convert a hash to \fBthe \f(CRsri\fR format\fR that includes an algorithm specification: .LP .EX # nix hash convert --hash-algo sha1 800d59cfcd3c05e900cb4e214be48f6b886a08df sha1-gA1Zz808BekAy04hS+SPa4hqCN8= .EE .IP or with an explicit \f(CR--to\fR format: .LP .EX # nix hash convert --hash-algo sha1 --to sri 800d59cfcd3c05e900cb4e214be48f6b886a08df sha1-gA1Zz808BekAy04hS+SPa4hqCN8= .EE .IP "\(bu" 3 Assert the input format of the hash: .LP .EX # nix hash convert --hash-algo sha256 --from nix32 ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0= error: input hash 'ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=' does not have the expected format '--from nix32' # nix hash convert --hash-algo sha256 --from nix32 1b8m03r63zqhnjf7l5wnldhh7c134ap5vpj0850ymkq1iyzicy5s sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0= .EE .SH Description .LP \f(CRnix hash convert\fR converts hashes from one encoding to another. .SH Options .IP "\(bu" 3 \fB\f(CR--from\fR\fR \fIhash-format\fR .IP Hash format (\f(CRbase16\fR, \f(CRnix32\fR, \f(CRbase64\fR, \f(CRsri\fR). .IP "\(bu" 3 \fB\f(CR--hash-algo\fR\fR \fIhash-algo\fR .IP Hash algorithm (\f(CRmd5\fR, \f(CRsha1\fR, \f(CRsha256\fR, or \f(CRsha512\fR). Can be omitted for SRI hashes. .IP "\(bu" 3 \fB\f(CR--to\fR\fR \fIhash-format\fR .IP Hash format (\f(CRbase16\fR, \f(CRnix32\fR, \f(CRbase64\fR, \f(CRsri\fR). Default: \f(CRsri\fR. .SS Logging-related options .IP "\(bu" 3 \fB\f(CR--debug\fR\fR .IP Set the logging verbosity level to \(oqdebug\(cq. .IP "\(bu" 3 \fB\f(CR--log-format\fR\fR \fIformat\fR .IP Set the format of log output; one of \f(CRraw\fR, \f(CRinternal-json\fR, \f(CRbar\fR or \f(CRbar-with-logs\fR. .IP "\(bu" 3 \fB\f(CR--print-build-logs\fR\fR / \f(CR-L\fR .IP Print full build logs on standard error. .IP "\(bu" 3 \fB\f(CR--quiet\fR\fR .IP Decrease the logging verbosity level. .IP "\(bu" 3 \fB\f(CR--verbose\fR\fR / \f(CR-v\fR .IP Increase the logging verbosity level. .SS Miscellaneous global options .IP "\(bu" 3 \fB\f(CR--help\fR\fR .IP Show usage information. .IP "\(bu" 3 \fB\f(CR--offline\fR\fR .IP Disable substituters and consider all previously downloaded files up-to-date. .IP "\(bu" 3 \fB\f(CR--option\fR\fR \fIname\fR \fIvalue\fR .IP Set the Nix configuration setting \fIname\fR to \fIvalue\fR (overriding \f(CRnix.conf\fR). .IP "\(bu" 3 \fB\f(CR--refresh\fR\fR .IP Consider all previously downloaded files out-of-date. .IP "\(bu" 3 \fB\f(CR--version\fR\fR .IP Show version information. .RS .LP \fBNote\fR .PP See \fB\f(CRman nix.conf\fR\fR for overriding configuration settings with command line flags. .RE