Class HSMHTTPRequestProcessor<T extends org.web3j.crypto.HSMHTTPPass>

java.lang.Object
org.web3j.service.HSMHTTPRequestProcessor<T>
Type Parameters:
T - Object with required parameters to perform request to a HSM
All Implemented Interfaces:
HSMRequestProcessor<org.web3j.crypto.HSMHTTPPass>

public abstract class HSMHTTPRequestProcessor<T extends org.web3j.crypto.HSMHTTPPass> extends Object implements HSMRequestProcessor<org.web3j.crypto.HSMHTTPPass>
Request processor to a HSM through the HTTP
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final okhttp3.MediaType
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HSMHTTPRequestProcessor(okhttp3.OkHttpClient okHttpClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.web3j.crypto.Sign.SignatureData
    callHSM(byte[] dataToSign, org.web3j.crypto.HSMHTTPPass pass)
    Call a HSM (hardware security module)
    protected abstract okhttp3.Request
    createRequest(byte[] dataToSign, org.web3j.crypto.HSMHTTPPass pass)
     
    protected abstract String
    readResponse(InputStream responseData)
     

    Methods inherited from class java.lang.Object

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

    • JSON

      public static final okhttp3.MediaType JSON
  • Constructor Details

    • HSMHTTPRequestProcessor

      public HSMHTTPRequestProcessor(okhttp3.OkHttpClient okHttpClient)
  • Method Details

    • callHSM

      public org.web3j.crypto.Sign.SignatureData callHSM(byte[] dataToSign, org.web3j.crypto.HSMHTTPPass pass)
      Description copied from interface: HSMRequestProcessor
      Call a HSM (hardware security module)
      Specified by:
      callHSM in interface HSMRequestProcessor<T extends org.web3j.crypto.HSMHTTPPass>
      Parameters:
      dataToSign - message hash to sign.
      pass - Object with required parameters to perform request to a HSM.
      Returns:
      SignatureData v | r | s
    • createRequest

      protected abstract okhttp3.Request createRequest(byte[] dataToSign, org.web3j.crypto.HSMHTTPPass pass)
    • readResponse

      protected abstract String readResponse(InputStream responseData)