Skip to main content

akeyless_api/models/
verify_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct VerifyPkcs1 {
16    /// The display id of the key to use in the verification process
17    #[serde(rename = "display-id", skip_serializing_if = "Option::is_none")]
18    pub display_id: Option<String>,
19    /// HashFunction defines the hash function (e.g. sha-256)
20    #[serde(rename = "hash-function", skip_serializing_if = "Option::is_none")]
21    pub hash_function: Option<String>,
22    /// Select default assumed format for the plaintext message. Currently supported options: [base64]
23    #[serde(rename = "input-format", skip_serializing_if = "Option::is_none")]
24    pub input_format: Option<String>,
25    /// The item id of the key to use in the verification process
26    #[serde(rename = "item-id", skip_serializing_if = "Option::is_none")]
27    pub item_id: Option<i64>,
28    /// Set output format to JSON
29    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
30    pub json: Option<bool>,
31    /// The name of the RSA key to use in the verification process
32    #[serde(rename = "key-name")]
33    pub key_name: String,
34    /// The message to be verified
35    #[serde(rename = "message")]
36    pub message: String,
37    /// Markes that the message is already hashed
38    #[serde(rename = "prehashed", skip_serializing_if = "Option::is_none")]
39    pub prehashed: Option<bool>,
40    /// The message's signature
41    #[serde(rename = "signature")]
42    pub signature: String,
43    /// Authentication token (see `/auth` and `/configure`)
44    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
45    pub token: Option<String>,
46    /// The universal identity token, Required only for universal_identity authentication
47    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
48    pub uid_token: Option<String>,
49    /// The version of the key to use for verification
50    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
51    pub version: Option<i32>,
52}
53
54impl VerifyPkcs1 {
55    pub fn new(key_name: String, message: String, signature: String) -> VerifyPkcs1 {
56        VerifyPkcs1 {
57            display_id: None,
58            hash_function: None,
59            input_format: None,
60            item_id: None,
61            json: None,
62            key_name,
63            message,
64            prehashed: None,
65            signature,
66            token: None,
67            uid_token: None,
68            version: None,
69        }
70    }
71}
72