Skip to main content

rocie_client/models/
password_hash.rs

1// rocie - An enterprise grocery management system
2//
3// Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6// This file is part of Rocie.
7//
8// You should have received a copy of the License along with this program.
9// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
10
11/*
12 * rocie-server
13 *
14 * An enterprise grocery management system - server
15 *
16 * The version of the OpenAPI document: 0.1.0
17 * Contact: benedikt.peetz@b-peetz.de
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23
24/// PasswordHash : This is stored as an PHC password string.  This type corresponds to the string representation of a PHC string as described in the [PHC string format specification][1].  PHC strings have the following format:  ```text $<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] ```
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct PasswordHash {
27    #[serde(rename = "value")]
28    pub value: String,
29}
30
31impl PasswordHash {
32    /// This is stored as an PHC password string.  This type corresponds to the string representation of a PHC string as described in the [PHC string format specification][1].  PHC strings have the following format:  ```text $<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] ```
33    pub fn new(value: String) -> PasswordHash {
34        PasswordHash { value }
35    }
36}