/// Converts a miracl-compatible plaintext into a standard-sized plaintext
/// chunk.
///
/// Note: This function may be deprecated when we support out-of-range
/// plaintexts.
///
/// # Panics
/// This will panic of any of the plaintexts is too large to fit into a
/// standard-sized chunk.
Converts a miracl-compatible plaintext into a standard-sized plaintext
chunk.

This function may be deprecated when we support out-of-range
plaintexts.
Converts a miracl - compatible plaintext into a standard - sized plaintext chunk . This function may be deprecated when we support out - of - range plaintexts .
pub fn plaintext_to_bytes(plaintext: &[isize]) -> FsEncryptionPlaintext {
    let mut chunks = [0; NUM_CHUNKS];
    for (dst, src) in chunks[..].iter_mut().zip(plaintext) {
        *dst = Chunk::try_from(*src).expect("Invalid chunk: Too large to serialise");
    }
    FsEncryptionPlaintext { chunks }
}
pub fn plaintext_to_bytes ( plaintext : & [ isize ] ) -> FsEncryptionPlaintext { let mut chunks = [ 0 ; NUM_CHUNKS ] ; for ( dst , src ) in chunks [ .. ] . iter_mut ( ) . zip ( plaintext ) { * dst = Chunk :: try_from ( * src ) . expect ( " " ) ; } FsEncryptionPlaintext { chunks } }
Converts a miracl-compatible plaintext into a standard-sized plaintext
chunk.
Converts a miracl - compatible plaintext into a standard - sized plaintext chunk .
plaintext
&[isize]
panics
This will panic of any of the plaintexts is too large to fit into a
standard-sized chunk.
This will panic of any of the plaintexts is too large to fit into a standard - sized chunk .