pub struct EncryptedArtifactMetadata {
pub schema_version: u32,
pub content_cipher: ArtifactContentCipher,
pub key_version: u64,
pub plaintext_digest: ContentDigest,
pub plaintext_byte_len: u64,
pub nonce: String,
pub aad_digest: ContentDigest,
}Fields§
§schema_version: u32§content_cipher: ArtifactContentCipher§key_version: u64§plaintext_digest: ContentDigest§plaintext_byte_len: u64§nonce: String§aad_digest: ContentDigestImplementations§
Source§impl EncryptedArtifactMetadata
impl EncryptedArtifactMetadata
pub fn new( key_version: u64, plaintext: &[u8], nonce: [u8; 12], source: &RegistrySourceId, ) -> Result<Self, String>
pub fn validate(&self, source: &RegistrySourceId) -> Result<(), String>
pub fn aad_bytes(&self, source: &RegistrySourceId) -> Result<Vec<u8>, String>
pub fn decoded_nonce(&self) -> Result<[u8; 12], String>
Trait Implementations§
Source§impl Clone for EncryptedArtifactMetadata
impl Clone for EncryptedArtifactMetadata
Source§fn clone(&self) -> EncryptedArtifactMetadata
fn clone(&self) -> EncryptedArtifactMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptedArtifactMetadata
impl Debug for EncryptedArtifactMetadata
Source§impl<'de> Deserialize<'de> for EncryptedArtifactMetadata
impl<'de> Deserialize<'de> for EncryptedArtifactMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EncryptedArtifactMetadata
impl StructuralPartialEq for EncryptedArtifactMetadata
Auto Trait Implementations§
impl Freeze for EncryptedArtifactMetadata
impl RefUnwindSafe for EncryptedArtifactMetadata
impl Send for EncryptedArtifactMetadata
impl Sync for EncryptedArtifactMetadata
impl Unpin for EncryptedArtifactMetadata
impl UnsafeUnpin for EncryptedArtifactMetadata
impl UnwindSafe for EncryptedArtifactMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.