Package com.wolfssl
Interface WolfSSLMacEncryptCallback
-
public interface WolfSSLMacEncryptCallback
wolfSSL MAC Encrypt Callback Interface. This interface specifies how applicaitons should implement the MAC Encrypt callback class to be used by wolfSSL when using atomic record layer callbacks.After implementing this interface, it should be passed as a parameter to the
WolfSSLContext.setMacEncryptCb()
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
macEncryptCallback(WolfSSLSession ssl, java.nio.ByteBuffer macOut, byte[] macIn, long macInSz, int macContent, int macVerify, java.nio.ByteBuffer encOut, java.nio.ByteBuffer encIn, long encSz, java.lang.Object ctx)
Atomic record layer MAC Encrypt callback method.
-
-
-
Method Detail
-
macEncryptCallback
int macEncryptCallback(WolfSSLSession ssl, java.nio.ByteBuffer macOut, byte[] macIn, long macInSz, int macContent, int macVerify, java.nio.ByteBuffer encOut, java.nio.ByteBuffer encIn, long encSz, java.lang.Object ctx)
Atomic record layer MAC Encrypt callback method. This method acts as the Atomic User Record Processing Mac/Encrypt callback to be used with the wolfSSL atomic record layer processing.- Parameters:
ssl
- the current SSL session object from which the callback was initiated.macOut
- output buffer where the result of the mac should be stored.macIn
- the mac input buffermacInSz
- the size of the mac input buffer, macInmacContent
- used for setTlsHmacInner(), the type of messagemacVerify
- used for setTlsHmacInner(), specifies whether this is a verification of a peer message.encOut
- the output buffer where the result on the encryption should be stored.encIn
- the input buffer to encryptencSz
- the size of the input buffer, encInctx
- custom user context to be used- Returns:
0
upon success, otherwise a negative value on error.
-
-