Class AesRaCipher

java.lang.Object
org.teamapps.cluster.crypto.AesRaCipher

public class AesRaCipher
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    AesRaCipher​(byte[] key, byte[] ivData, int ctrOffset)  
    AesRaCipher​(java.lang.String key)  
    AesRaCipher​(java.lang.String key, java.lang.String ivAsHex)  
    AesRaCipher​(java.lang.String key, java.lang.String ivAsHex, int ctrOffset)  
  • Method Summary

    Modifier and Type Method Description
    static byte[] combineArrays​(byte[] array1, byte[] array2)  
    byte[] decrypt​(byte[] data, int counter)  
    byte[] decrypt​(byte[] data, int offset, int counter)  
    double decryptDouble​(double value, int counter)  
    float decryptFloat​(float value, int counter)  
    byte[] decryptInlinedIv​(byte[] data)  
    byte[] decryptInlinedIv​(byte[] data, int offset)  
    int decryptInt​(int value, int counter)  
    long decryptLong​(long value, int counter)  
    byte[] decryptSave​(byte[] data, int counter)  
    byte[] decryptSaveInlinedIv​(byte[] data)  
    java.lang.String decryptString​(byte[] data, int counter)  
    byte[] encrypt​(byte[] data, int counter)  
    double encryptDouble​(double value, int counter)  
    float encryptFloat​(float value, int counter)  
    byte[] encryptInlinedIv​(byte[] data)  
    int encryptInt​(int value, int counter)  
    long encryptLong​(long value, int counter)  
    byte[] encryptSave​(byte[] data, int counter)  
    byte[] encryptSaveInlinedIv​(byte[] data)  
    byte[] encryptString​(java.lang.String value, int counter)  
    static void main​(java.lang.String[] args)  

    Methods inherited from class java.lang.Object

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

    • AesRaCipher

      public AesRaCipher​(java.lang.String key) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • AesRaCipher

      public AesRaCipher​(java.lang.String key, java.lang.String ivAsHex) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • AesRaCipher

      public AesRaCipher​(java.lang.String key, java.lang.String ivAsHex, int ctrOffset) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • AesRaCipher

      public AesRaCipher​(byte[] key, byte[] ivData, int ctrOffset) throws java.lang.Exception
      Throws:
      java.lang.Exception
  • Method Details

    • encrypt

      public byte[] encrypt​(byte[] data, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptSave

      public byte[] encryptSave​(byte[] data, int counter)
    • decrypt

      public byte[] decrypt​(byte[] data, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptSave

      public byte[] decryptSave​(byte[] data, int counter)
    • decrypt

      public byte[] decrypt​(byte[] data, int offset, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptInlinedIv

      public byte[] encryptInlinedIv​(byte[] data) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptSaveInlinedIv

      public byte[] encryptSaveInlinedIv​(byte[] data)
    • decryptInlinedIv

      public byte[] decryptInlinedIv​(byte[] data) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptSaveInlinedIv

      public byte[] decryptSaveInlinedIv​(byte[] data)
    • decryptInlinedIv

      public byte[] decryptInlinedIv​(byte[] data, int offset) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • combineArrays

      public static byte[] combineArrays​(byte[] array1, byte[] array2)
    • encryptString

      public byte[] encryptString​(java.lang.String value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptString

      public java.lang.String decryptString​(byte[] data, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptInt

      public int encryptInt​(int value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptInt

      public int decryptInt​(int value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptLong

      public long encryptLong​(long value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptLong

      public long decryptLong​(long value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptDouble

      public double encryptDouble​(double value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptDouble

      public double decryptDouble​(double value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • encryptFloat

      public float encryptFloat​(float value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • decryptFloat

      public float decryptFloat​(float value, int counter) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • main

      public static void main​(java.lang.String[] args) throws java.lang.Exception
      Throws:
      java.lang.Exception