[][src]Function pgp::types::mpi

pub fn mpi<'a>(input: &'a [u8]) -> IResult<&'a [u8], MpiRef<'a>>

Parse Multi Precision Integers Ref: https://tools.ietf.org/html/rfc4880.html#section-3.2

Examples

use pgp::types::mpi;

// Decode the number `1`.
assert_eq!(
    mpi(&[0x00, 0x01, 0x01][..]).unwrap(),
    (&b""[..], (&[1][..]).into())
);