Record Class OpaqueLoginInitResult

java.lang.Object
java.lang.Record
co.cryptoservice.sdk.OpaqueLoginInitResult
Record Components:
ke2 - the serialized KE2 message; lowercase hex
sessionId - single-use login session identifier; pass it to /v2/opaque/login/finish

public record OpaqueLoginInitResult(String ke2, String sessionId) extends Record
What POST /v2/opaque/login/init answers: initiate OPAQUE login handshake.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a OpaqueLoginInitResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    ke2()
    Returns the value of the ke2 record component.
    byte[]
    ke2() decoded from hex.
    Returns the value of the sessionId record component.
    Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OpaqueLoginInitResult

      public OpaqueLoginInitResult(String ke2, String sessionId)
      Creates an instance of a OpaqueLoginInitResult record class.
      Parameters:
      ke2 - the value for the ke2 record component
      sessionId - the value for the sessionId record component
  • Method Details

    • ke2Bytes

      public byte[] ke2Bytes()
      ke2() decoded from hex.
      Returns:
      the bytes, or null when ke2 is absent
      Throws:
      IllegalArgumentException - when the server sent malformed hex
    • toString

      public String toString()
      Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.
      Specified by:
      toString in class Record
      Returns:
      a description safe to log
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • ke2

      public String ke2()
      Returns the value of the ke2 record component.
      Returns:
      the value of the ke2 record component
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component