Skip to main content

akeyless_api/models/
sign_pkcs1.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SignPkcs1 : signPKCS1 is a command that calculates the signature of hashed data using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SignPkcs1 {
17    /// The display id of the key to use in the signing process
18    #[serde(rename = "display-id", skip_serializing_if = "Option::is_none")]
19    pub display_id: Option<String>,
20    /// HashFunction defines the hash function (e.g. sha-256)
21    #[serde(rename = "hash-function", skip_serializing_if = "Option::is_none")]
22    pub hash_function: Option<String>,
23    /// Select default assumed format for the plaintext message. Currently supported options: [base64]
24    #[serde(rename = "input-format", skip_serializing_if = "Option::is_none")]
25    pub input_format: Option<String>,
26    /// The item id of the key to use in the signing process
27    #[serde(rename = "item-id", skip_serializing_if = "Option::is_none")]
28    pub item_id: Option<i64>,
29    /// Set output format to JSON
30    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
31    pub json: Option<bool>,
32    /// The name of the RSA key to use in the signing process
33    #[serde(rename = "key-name", skip_serializing_if = "Option::is_none")]
34    pub key_name: Option<String>,
35    /// The message to be signed
36    #[serde(rename = "message")]
37    pub message: String,
38    /// Markes that the message is already hashed
39    #[serde(rename = "prehashed", skip_serializing_if = "Option::is_none")]
40    pub prehashed: Option<bool>,
41    /// Authentication token (see `/auth` and `/configure`)
42    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
43    pub token: Option<String>,
44    /// The universal identity token, Required only for universal_identity authentication
45    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
46    pub uid_token: Option<String>,
47    /// The version of the key to use for signing
48    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
49    pub version: Option<i32>,
50}
51
52impl SignPkcs1 {
53    /// signPKCS1 is a command that calculates the signature of hashed data using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5.
54    pub fn new(message: String) -> SignPkcs1 {
55        SignPkcs1 {
56            display_id: None,
57            hash_function: None,
58            input_format: None,
59            item_id: None,
60            json: None,
61            key_name: None,
62            message,
63            prehashed: None,
64            token: None,
65            uid_token: None,
66            version: None,
67        }
68    }
69}
70