Record Class ModuleLatticeDsaResult

java.lang.Object
java.lang.Record
net.jrodolfo.java_evolution.java24.quantum_resistant_crypto.ModuleLatticeDsaResult
Record Components:
algorithm - the signature algorithm used by the example
message - the message that was signed
signature - the digital signature bytes
verifiesOriginalMessage - whether verification succeeds for the original message
rejectsTamperedMessage - whether verification fails for a modified message

public record ModuleLatticeDsaResult(String algorithm, String message, byte[] signature, boolean verifiesOriginalMessage, boolean rejectsTamperedMessage) extends Record
Captures the result of signing and verifying data with ML-DSA.
  • Constructor Details

    • ModuleLatticeDsaResult

      public ModuleLatticeDsaResult(String algorithm, String message, byte[] signature, boolean verifiesOriginalMessage, boolean rejectsTamperedMessage)
      Creates an immutable signature result.
  • Method Details

    • signature

      public byte[] signature()
      Returns the value of the signature record component.
      Returns:
      the value of the signature record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • algorithm

      public String algorithm()
      Returns the value of the algorithm record component.
      Returns:
      the value of the algorithm record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • verifiesOriginalMessage

      public boolean verifiesOriginalMessage()
      Returns the value of the verifiesOriginalMessage record component.
      Returns:
      the value of the verifiesOriginalMessage record component
    • rejectsTamperedMessage

      public boolean rejectsTamperedMessage()
      Returns the value of the rejectsTamperedMessage record component.
      Returns:
      the value of the rejectsTamperedMessage record component