Class PqcHandshakeResult

Object
PqcHandshakeResult

public final class PqcHandshakeResult extends Object
Immutable value object returned by PQC hybrid handshake endpoints. It bundles the freshly negotiated AES-256 session key together with the server-allocated sessionId.

Security considerations

  • The byte array is returned by reference; callers should immediately copy it if longer retention is required, then overwrite the original with zeroes, e.g. Arrays.fill(result.getAesKey(), (byte)0);.
  • sessionId is safe to log, but aesKey is not.
Since:
1.0
Author:
Javier Galindo
  • Constructor Details

    • PqcHandshakeResult

      public PqcHandshakeResult(byte[] aesKey, String sessionId)
  • Method Details

    • getAesKey

      public byte[] getAesKey()
      Returns a direct reference to the AES-256 key bytes.
    • getSessionId

      public String getSessionId()
      Returns the opaque session identifier for follow-up calls.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Constant-time equality check on sessionId only.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object