Package com.wolfssl

Interface WolfSSLRsaEncCallback


  • public interface WolfSSLRsaEncCallback
    wolfSSL RSA Public Encrypt Callback Interface. This interface specifies how applicaitons should implement the RSA public encrypt callback class to be used by wolfSSL.

    After implementing this interface, it should be passed as a parameter to the WolfSSLContext.setRsaEncCb() method to be registered with the native wolfSSL library.

    Version:
    1.0, August 2013
    Author:
    wolfSSL
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int rsaEncCallback​(WolfSSLSession ssl, java.nio.ByteBuffer in, long inSz, java.nio.ByteBuffer out, int[] outSz, java.nio.ByteBuffer keyDer, long keySz, java.lang.Object ctx)
      RSA public encrypt callback method.
    • Method Detail

      • rsaEncCallback

        int rsaEncCallback​(WolfSSLSession ssl,
                           java.nio.ByteBuffer in,
                           long inSz,
                           java.nio.ByteBuffer out,
                           int[] outSz,
                           java.nio.ByteBuffer keyDer,
                           long keySz,
                           java.lang.Object ctx)
        RSA public encrypt callback method. This method acts as RSA public enrypt callback.
        Parameters:
        ssl - the current SSL session object from which the callback was initiated.
        in - input buffer to encrypt
        inSz - length of the input, in
        out - output buffer where the result of encryption should be stored.
        outSz - input/output variable that specifies the size of the output buffer upon invocation. The actual size of the encryption should be stored here before returning. Use the first element of the array for storage.
        keyDer - RSA Public key in ASN1 format
        keySz - length of the key, keyDer, in bytes
        ctx - custom user-registered ECC signing context
        Returns:
        0 upon success, otherwise a negative value on error.