Home Explore Blog CI



nushell

commands/docs/hash_md5.md
cb7080ea2d0d2c996810790b480eb6eda0bae3190de339b2000000030000051a
---
title: hash md5
categories: |
  hash
version: 0.104.0
hash: |
  Hash a value using the md5 hash algorithm.
usage: |
  Hash a value using the md5 hash algorithm.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `hash md5` for [hash](/commands/categories/hash.md)

<div class='command-title'>Hash a value using the md5 hash algorithm.</div>

## Signature

```> hash md5 {flags} ...rest```

## Flags

 -  `--binary, -b`: Output binary instead of hexadecimal representation

## Parameters

 -  `...rest`: Optionally md5 hash data by cell path.


## Input/output types:

| input  | output |
| ------ | ------ |
| binary | any    |
| record | record |
| string | any    |
| table  | table  |
## Examples

Return the md5 hash of a string, hex-encoded
```nu
> 'abcdefghijklmnopqrstuvwxyz' | hash md5
c3fcd3d76192e4007dfb496cca67e13b
```

Return the md5 hash of a string, as binary
```nu
> 'abcdefghijklmnopqrstuvwxyz' | hash md5 --binary
Length: 16 (0x10) bytes | printable whitespace ascii_other non_ascii
00000000:   c3 fc d3 d7  61 92 e4 00  7d fb 49 6c  ca 67 e1 3b   ××××a××0}×Il×g×;

```

Return the md5 hash of a file's contents
```nu
> open ./nu_0_24_1_windows.zip | hash md5

```

Chunks
c76c5c0d (1st chunk of `commands/docs/hash_md5.md`)
Title: hash md5
Summary
This command calculates the MD5 hash of a given input. It accepts strings, binaries, records, and tables as input. The output is the MD5 hash, which can be either a hexadecimal representation (default) or a binary format (using the `--binary` flag). It can also be applied to a file to hash its contents.