fn base64_data_triple_to_key_triple(
    app_name: &[u8],
    provider_id: ProviderID,
    key_name: &[u8],
) -> Result<KeyTriple, String> {
    let app_name = ApplicationName::new(base64_data_to_string(app_name)?);
    let key_name = base64_data_to_string(key_name)?;

    Ok(KeyTriple {
        app_name,
        provider_id,
        key_name,
    })
}
/// Decodes key triple's data to the original path.
/// The Provider ID data is not converted as base64.
///
/// # Errors
///
/// Returns an error as a string if either the decoding or the bytes conversion to UTF-8 failed.
Decodes key triple's data to the original path.
The Provider ID data is not converted as base64.
Decodes key triple ' s data to the original path . The Provider ID data is not converted as base64 .
fn base64_data_triple_to_key_triple(
    app_name: &[u8],
    provider_id: ProviderID,
    key_name: &[u8],
) -> Result<KeyTriple, String> {
    let app_name = ApplicationName::new(base64_data_to_string(app_name)?);
    let key_name = base64_data_to_string(key_name)?;
    Ok(KeyTriple {
        app_name,
        provider_id,
        key_name,
    })
}
fn base64_data_triple_to_key_triple ( app_name : & [ u8 ] , provider_id : ProviderID , key_name : & [ u8 ] , ) -> Result < KeyTriple , String > { let app_name = ApplicationName :: new ( base64_data_to_string ( app_name ) ? ) ; let key_name = base64_data_to_string ( key_name ) ? ; Ok ( KeyTriple { app_name , provider_id , key_name , } ) }
Decodes key triple's data to the original path.
Decodes key triple ' s data to the original path .
app_name
&[u8]
provider_id
ProviderID
key_name
&[u8]
app_name
&[u8]
provider_id
ProviderID
key_name
&[u8]
errors
Returns an error as a string if either the decoding or the bytes conversion to UTF-8 failed.
Returns an error as a string if either the decoding or the bytes conversion to UTF - 8 failed .