nethsm_sdk_rs/models/encrypt_mode.rs
1/*
2 * NetHSM
3 *
4 * All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All [base64](https://tools.ietf.org/html/rfc4648#section-4) encoded values are Big Endian.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: Nitrokey <info@nitrokey.com>
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
12#[non_exhaustive]
13pub enum EncryptMode {
14 #[serde(rename = "AES_CBC")]
15 AesCbc,
16}
17
18impl std::fmt::Display for EncryptMode {
19 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20 write!(
21 f,
22 "{}",
23 match self {
24 Self::AesCbc => "AES_CBC",
25 }
26 )
27 }
28}
29
30impl Default for EncryptMode {
31 fn default() -> EncryptMode {
32 Self::AesCbc
33 }
34}