Class CryptoUtilities

java.lang.Object
net.anwiba.commons.crypto.CryptoUtilities

public class CryptoUtilities extends Object
  • Constructor Details

    • CryptoUtilities

      public CryptoUtilities()
  • Method Details

    • sign

      public static String sign(String string) throws CodingException
      Throws:
      CodingException
    • sign

      public static byte[] sign(byte[] data) throws CodingException
      Throws:
      CodingException
    • getEncodedBytes

      public static byte[] getEncodedBytes(byte[] key, byte[] buffer) throws CodingException
      Throws:
      CodingException
    • getDecodedBytes

      public static byte[] getDecodedBytes(byte[] key, byte[] array) throws CodingException
      Throws:
      CodingException
    • performDecoding

      public static byte[] performDecoding(org.bouncycastle.crypto.params.KeyParameter keyParameter, byte[] array) throws org.bouncycastle.crypto.DataLengthException, IllegalStateException, org.bouncycastle.crypto.InvalidCipherTextException, IOException
      Throws:
      org.bouncycastle.crypto.DataLengthException
      IllegalStateException
      org.bouncycastle.crypto.InvalidCipherTextException
      IOException
    • performDecoding

      public static byte[] performDecoding(org.bouncycastle.crypto.params.KeyParameter keyParameter, InputStream inputStream) throws org.bouncycastle.crypto.InvalidCipherTextException, org.bouncycastle.crypto.DataLengthException, IllegalStateException, IOException
      Throws:
      org.bouncycastle.crypto.InvalidCipherTextException
      org.bouncycastle.crypto.DataLengthException
      IllegalStateException
      IOException
    • performEncoding

      public static byte[] performEncoding(org.bouncycastle.crypto.params.KeyParameter keyParameter, byte[] array) throws org.bouncycastle.crypto.DataLengthException, IllegalStateException, org.bouncycastle.crypto.InvalidCipherTextException, IOException
      Throws:
      org.bouncycastle.crypto.DataLengthException
      IllegalStateException
      org.bouncycastle.crypto.InvalidCipherTextException
      IOException