amebazii::types::image

Function set_default_signature

Source
pub fn set_default_signature<I>(
    image: &mut I,
    key: Option<&[u8]>,
) -> Result<(), Error>
where I: AsImage,
Expand description

Sets the signature for a given image.

This function computes the signature using build_default_signature and then sets the signature for the image using set_signature.

§Arguments:

  • image: The image-like object that implements AsImage.
  • key: The key used to compute the signature.

§Returns:

  • Result<(), crate::error::Error>: An empty result on success, or an error.