Class PqcTransportInterceptor

java.lang.Object
co.ankatech.ankasecure.sdk.transport.PqcTransportInterceptor
All Implemented Interfaces:
okhttp3.Interceptor

public class PqcTransportInterceptor extends Object implements okhttp3.Interceptor
OkHttp Interceptor that transparently encrypts request bodies and decrypts response bodies when PQC transport encryption is enabled.

Requests without a body (GET, DELETE, etc.) are passed through unchanged. Special paths (handshake, auth, streaming, utility) are also skipped.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface okhttp3.Interceptor

    okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Header that tells the server which KEM algorithm to use.
    static final String
    Header that carries the PQC session identifier.
    static final String
    Header that indicates the payload is PQC-encrypted.

    Fields inherited from interface okhttp3.Interceptor

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    okhttp3.Response
    intercept(okhttp3.Interceptor.Chain chain)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HEADER_TRANSPORT

      public static final String HEADER_TRANSPORT
      Header that indicates the payload is PQC-encrypted.
      See Also:
    • HEADER_SESSION

      public static final String HEADER_SESSION
      Header that carries the PQC session identifier.
      See Also:
    • HEADER_KEM

      public static final String HEADER_KEM
      Header that tells the server which KEM algorithm to use.
      See Also:
  • Constructor Details

  • Method Details

    • intercept

      @NotNull public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException
      Specified by:
      intercept in interface okhttp3.Interceptor
      Throws:
      IOException