# Trait crypto::blockmodes::PaddingProcessor [−] [src]

    pub trait PaddingProcessor {
        fn pad_input<W: WriteBuffer>(&mut self, input_buffer: &mut W);
        fn strip_output<R: ReadBuffer>(&mut self, output_buffer: &mut R) -> bool;
    }

A PaddingProcessor handles adding or removing padding

## Required Methods

### `fn pad_input<W: WriteBuffer>(&mut self, input_buffer: &mut W)`

Add padding to the last block of input data If the mode can't handle a non-full block, it signals that error by simply leaving the block as it is which will be detected as an InvalidLength error.

### `fn strip_output<R: ReadBuffer>(&mut self, output_buffer: &mut R) -> bool`

Remove padding from the last block of output data If false is returned, the processing fails

## Implementors

- `impl PaddingProcessor for NoPadding`
- `impl PaddingProcessor for PkcsPadding`
- `impl<X: PaddingProcessor> PaddingProcessor for EncPadding<X>`
- `impl<X: PaddingProcessor> PaddingProcessor for DecPadding<X>`

# 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`)