Class SalmonNativeTransformer

java.lang.Object
com.mku.salmon.transform.SalmonAES256CTRTransformer
com.mku.salmon.transform.SalmonNativeTransformer
All Implemented Interfaces:
ISalmonCTRTransformer
Direct Known Subclasses:
SalmonAesIntrTransformer, TinyAesTransformer

public class SalmonNativeTransformer extends SalmonAES256CTRTransformer
Generic Native AES transformer. Extend this with your specific native transformer.
  • Constructor Details

    • SalmonNativeTransformer

      public SalmonNativeTransformer()
  • Method Details

    • setNativeProxy

      public static void setNativeProxy(INativeProxy proxy)
      The native proxy to use for loading libraries for different platforms and operating systems.
      Parameters:
      proxy - The proxy
    • getNativeProxy

      public static INativeProxy getNativeProxy()
    • encryptData

      public int encryptData(byte[] srcBuffer, int srcOffset, byte[] destBuffer, int destOffset, int count)
      Encrypt the data.
      Parameters:
      srcBuffer - The source byte array.
      srcOffset - The source byte offset.
      destBuffer - The destination byte array.
      destOffset - The destination byte offset.
      count - The number of bytes to transform.
      Returns:
      The number of bytes transformed.
    • decryptData

      public int decryptData(byte[] srcBuffer, int srcOffset, byte[] destBuffer, int destOffset, int count)
      Decrypt the data.
      Parameters:
      srcBuffer - The source byte array.
      srcOffset - The source byte offset.
      destBuffer - The destination byte array.
      destOffset - The destination byte offset.
      count - The number of bytes to transform.
      Returns:
      The number of bytes transformed.