pub struct EncryptDataRequestBuilder { /* private fields */ }
Expand description
Builder for EncryptDataRequest
.
Implementations§
source§impl EncryptDataRequestBuilder
impl EncryptDataRequestBuilder
pub fn mount<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Specifies the name of the encryption key to encrypt against.
sourcepub fn plaintext<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn plaintext<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Specifies base64 encoded plaintext to be encoded. NOTE: All plaintext data must be base64-encoded. The reason for this requirement is that Vault does not require that the plaintext is “text”. It could be a binary file such as a PDF or image. The easiest safe transport mechanism for this data as part of a JSON payload is to base64-encode it.
sourcepub fn context<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn context<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Specifies the base64 encoded context for key derivation. This is required if key derivation is enabled for this key.
sourcepub fn key_version<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn key_version<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
Specifies the version of the key to use for encryption. If not set, uses the latest version. Must be greater than or equal to the key’s min_encryption_version, if set.
sourcepub fn nonce<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn nonce<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Specifies the base64 encoded nonce value. This must be provided if convergent encryption is enabled for this key and the key was generated with Vault 0.6.1. Not required for keys created in 0.6.2+. The value must be exactly 96 bits (12 bytes) long and the user must ensure that for any given context (and thus, any given encryption key) this nonce value is never reused.
sourcepub fn key_type<VALUE: Into<KeyType>>(&mut self, value: VALUE) -> &mut Self
pub fn key_type<VALUE: Into<KeyType>>(&mut self, value: VALUE) -> &mut Self
This parameter is required when encryption key is expected to be created. When performing an upsert operation, the type of key to create.
sourcepub fn convergent_encryption<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn convergent_encryption<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
This parameter will only be used when a key is expected to be created. Whether to support convergent encryption. This is only supported when using a key with key derivation enabled and will require all requests to carry both a context and 96-bit (12-byte) nonce. The given nonce will be used in place of a randomly generated nonce. As a result, when the same context and nonce are supplied, the same ciphertext is generated. It is very important when using this mode that you ensure that all nonces are unique for a given context. Failing to do so will severely impact the ciphertext’s security.
sourcepub fn build(
&self,
) -> Result<EncryptDataRequest, EncryptDataRequestBuilderError>
pub fn build( &self, ) -> Result<EncryptDataRequest, EncryptDataRequestBuilderError>
Trait Implementations§
source§impl Clone for EncryptDataRequestBuilder
impl Clone for EncryptDataRequestBuilder
source§fn clone(&self) -> EncryptDataRequestBuilder
fn clone(&self) -> EncryptDataRequestBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for EncryptDataRequestBuilder
impl RefUnwindSafe for EncryptDataRequestBuilder
impl Send for EncryptDataRequestBuilder
impl Sync for EncryptDataRequestBuilder
impl Unpin for EncryptDataRequestBuilder
impl UnwindSafe for EncryptDataRequestBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)