# Trait ethcore_util::sha3::Hashable [−] [src]

    pub trait Hashable {
        fn sha3(&self) -> H256;

        fn sha3_into(&self, dest: &mut [u8]) { ... }
    }

Types implementing this trait are sha3able.

    extern crate ethcore_util as util;
    use std::str::FromStr;
    use util::sha3::*;
    use util::hash::*;

    fn main() {
        assert_eq!([0u8; 0].sha3(), H256::from_str("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470").unwrap());
    }

## Required Methods

### `fn sha3(&self) -> H256`

Calculate SHA3 of this object.

## Provided Methods

### `fn sha3_into(&self, dest: &mut [u8])`

Calculate SHA3 of this object and place result into dest.

## Implementors

- `impl<T> Hashable for T where T: AsRef<[u8]>`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)