pub struct LicenseKey {Show 24 fields
pub ProductId: u64,
pub Id: Option<u64>,
pub Key: Option<String>,
pub Created: u64,
pub Expires: u64,
pub Period: u64,
pub F1: bool,
pub F2: bool,
pub F3: bool,
pub F4: bool,
pub F5: bool,
pub F6: bool,
pub F7: bool,
pub F8: bool,
pub Notes: Option<String>,
pub Block: bool,
pub GlobalId: Option<u64>,
pub Customer: Option<Customer>,
pub ActivatedMachines: Vec<ActivationData>,
pub TrialActivation: bool,
pub MaxNoOfMachines: Option<u64>,
pub AllowedMachines: Vec<String>,
pub DataObjects: Vec<DataObject>,
pub SignDate: u64,
/* private fields */
}Expand description
Represents a license key in cryptolens format.
Fields§
§ProductId: u64§Id: Option<u64>§Key: Option<String>§Created: u64§Expires: u64§Period: u64§F1: bool§F2: bool§F3: bool§F4: bool§F5: bool§F6: bool§F7: bool§F8: bool§Notes: Option<String>§Block: bool§GlobalId: Option<u64>§Customer: Option<Customer>§ActivatedMachines: Vec<ActivationData>§TrialActivation: bool§MaxNoOfMachines: Option<u64>§AllowedMachines: Vec<String>§DataObjects: Vec<DataObject>§SignDate: u64Implementations§
Source§impl LicenseKey
impl LicenseKey
Sourcepub fn from_response_str(s: &str) -> Result<LicenseKey>
pub fn from_response_str(s: &str) -> Result<LicenseKey>
Sourcepub fn has_valid_signature(&self, public_key: &str) -> Result<bool>
pub fn has_valid_signature(&self, public_key: &str) -> Result<bool>
Verifies the validity of the digital signature associated with this license key.
§Arguments
public_key- A string slice containing the public key in XML format used to verify the signature.
§Returns
Returns true if the signature is valid, otherwise returns false.
§Errors
Returns an error if any cryptographic operations fail during verification.
Trait Implementations§
Source§impl Debug for LicenseKey
impl Debug for LicenseKey
Source§impl<'de> Deserialize<'de> for LicenseKey
impl<'de> Deserialize<'de> for LicenseKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LicenseKey
impl RefUnwindSafe for LicenseKey
impl Send for LicenseKey
impl Sync for LicenseKey
impl Unpin for LicenseKey
impl UnwindSafe for LicenseKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more