Trait c2pa::RemoteSigner
source · pub trait RemoteSigner: Sync {
// Required methods
fn sign_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reserve_size(&self) -> usize;
}
Required Methods§
sourcefn sign_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_remote<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the CoseSign1
bytes signed by the RemoteSigner
.
The size of returned Vec
must match the value returned by reserve_size
.
This data will be embedded in the JUMBF c2pa.signature
box of the manifest.
data
are the bytes of the claim to be remotely signed.
sourcefn reserve_size(&self) -> usize
fn reserve_size(&self) -> usize
Returns the size in bytes of the largest possible expected signature.
Signing will fail if the result of the sign
function is larger
than this value.