nethsm_sdk_rs/models/key_public_data.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/// KeyPublicData : The public key data is either a *modulus* and a *publicExponent* or a *data* field. The *data* field is used for EC keys. This field is null for Generic keys.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14#[non_exhaustive]
15pub struct KeyPublicData {
16 #[serde(rename = "modulus", skip_serializing_if = "Option::is_none")]
17 pub modulus: Option<String>,
18 #[serde(rename = "publicExponent", skip_serializing_if = "Option::is_none")]
19 pub public_exponent: Option<String>,
20 #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
21 pub data: Option<String>,
22}
23
24impl KeyPublicData {
25 /// The public key data is either a *modulus* and a *publicExponent* or a *data* field. The *data* field is used for EC keys. This field is null for Generic keys.
26 pub fn new() -> KeyPublicData {
27 KeyPublicData {
28 modulus: None,
29 public_exponent: None,
30 data: None,
31 }
32 }
33}