Function binascii::b64decode[][src]

pub fn b64decode<'a>(
    input: &[u8],
    output: &'a mut [u8]
) -> Result<&'a mut [u8], ConvertError>

Base64 Decoder - Converts a base64 encoded string to it's binary form.

Failures

This function will fail with:

  • ConvertError::InvalidInputLength - If the input length isn't divisable by 4 (bad padding)
  • ConvertError::InvalidOutputLength - If output's length isn't at least 3/4s of input's length
  • ConvertError::InvalidInput - If an invalid character was encountered while decoding