Class PqcTransportSession
java.lang.Object
co.ankatech.ankasecure.sdk.transport.PqcTransportSession
- All Implemented Interfaces:
AutoCloseable
Internal representation of a PQC transport session: holds sessionId,
AES key, and creation timestamp.
SDK-003 (secure-memory-cutover Slice 3): now implements AutoCloseable.
close() calls Zeroization.destroyIfPossible(Object) on the AES
SecretKey (best-effort — SecretKeySpec.destroy() throws
DestroyFailedException by default, which destroyIfPossible swallows;
the wrapping byte[] was already zeroized in
PqcSessionManager.getSession() immediately after the SecretKeySpec
was constructed). After close, the session must not be used; call sites guard with
isClosed() where needed.
-
Method Details
-
getSessionId
-
getAesKey
-
getCreatedAt
-
isClosed
public boolean isClosed()- Returns:
trueifclose()has been called; never throws
-
close
public void close()Best-effort destruction of the underlying AESSecretKey. Idempotent. The wrappingbyte[]was already zeroized at session creation time inPqcSessionManager.getSession().- Specified by:
closein interfaceAutoCloseable
-