Class OmemoAesCipher

    • Constructor Summary

      Constructors 
      Constructor Description
      OmemoAesCipher()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decryptAesGcmNoPadding​(byte[] ciphertext, byte[] key, byte[] initializationVector)  
      static byte[] encryptAesGcmNoPadding​(byte[] plaintext, byte[] key, byte[] initializationVector)  
      static byte[] encryptAesGcmNoPadding​(java.lang.String plaintext, byte[] key, byte[] initializationVector)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • decryptAesGcmNoPadding

        public static byte[] decryptAesGcmNoPadding​(byte[] ciphertext,
                                                    byte[] key,
                                                    byte[] initializationVector)
                                             throws java.security.InvalidKeyException,
                                                    javax.crypto.IllegalBlockSizeException,
                                                    javax.crypto.BadPaddingException,
                                                    java.security.NoSuchAlgorithmException,
                                                    javax.crypto.NoSuchPaddingException,
                                                    java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.InvalidKeyException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.InvalidAlgorithmParameterException
      • encryptAesGcmNoPadding

        public static byte[] encryptAesGcmNoPadding​(byte[] plaintext,
                                                    byte[] key,
                                                    byte[] initializationVector)
                                             throws java.security.NoSuchAlgorithmException,
                                                    javax.crypto.NoSuchPaddingException,
                                                    java.security.InvalidKeyException,
                                                    java.security.InvalidAlgorithmParameterException,
                                                    javax.crypto.IllegalBlockSizeException,
                                                    javax.crypto.BadPaddingException
        Throws:
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.InvalidKeyException
        java.security.InvalidAlgorithmParameterException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException
      • encryptAesGcmNoPadding

        public static byte[] encryptAesGcmNoPadding​(java.lang.String plaintext,
                                                    byte[] key,
                                                    byte[] initializationVector)
                                             throws java.security.NoSuchAlgorithmException,
                                                    javax.crypto.NoSuchPaddingException,
                                                    java.security.InvalidKeyException,
                                                    java.security.InvalidAlgorithmParameterException,
                                                    javax.crypto.IllegalBlockSizeException,
                                                    javax.crypto.BadPaddingException
        Throws:
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.InvalidKeyException
        java.security.InvalidAlgorithmParameterException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException