Skip to main content

prepare_encrypted_block

Function prepare_encrypted_block 

Source
pub fn prepare_encrypted_block(
    block_size: usize,
    crypto: &dyn CryptoEngine,
    codec: &PostcardCodec,
    kind: ObjectKind,
    raw_data: &[u8],
) -> FsResult<Vec<u8>>
Expand description

Encrypt raw data and pack it into a block-sized buffer (without writing to store). Returns the ready-to-write block bytes.