# Crate octavo_digest [−] [src]

Cryptographic hash functions primitives

Via Wikipedia:

The ideal cryptographic hash function has four main properties:

- it is easy to compute the hash value for any given message
- it is infeasible to generate a message from its hash
- it is infeasible to modify a message without changing the hash
- it is infeasible to find two different messages with the same hash.

# Example

Calculate SHA-512 sum:

use octavo_digest::prelude::*; let mut result = vec![0; sha2::Sha512::output_bytes()]; let mut sha = sha2::Sha512::default(); sha.update(data); sha.result(&mut result); for byte in result { print!("{:2x}", byte); } println!(" {}", data);

## Modules

blake2 |
BLAKE2 family |

md5 |
MD5 (Message-Digest Algorithm version 5) |

prelude |
Digest prelude |

ripemd |
RIPEMD (RACE Integrity Primitives Evaluation Message Digest) |

sha1 |
SHA-1 (Secure Hash Algorithm) |

sha2 |
SHA-2 family (Secure Hash Algorithm) |

sha3 |
SHA-3 family (Secure Hash Algorithm) |

tiger |
Tiger |

whirlpool |
WHIRLPOOL |

## Traits

Digest |
Hash function digest definition |