Hi,
I need to decrypt an AES encrypted string within B4A, I have the key and IV used for encryption. I am having trouble setting up Cipher to decrypt.
The last line creates a Java exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String javax.crypto.KeyGenerator.getAlgorithm()' on a null object reference
Any ideas?
G.
I need to decrypt an AES encrypted string within B4A, I have the key and IV used for encryption. I am having trouble setting up Cipher to decrypt.
B4X:
iv = Array As Byte(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6) ' 16 bytes for AES
mykey = Array As Byte(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6) ' 16 bytes for AES
c.Initialize("AES")
c.InitialisationVector = iv
kg.KeyFromBytes(mykey)
The last line creates a Java exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String javax.crypto.KeyGenerator.getAlgorithm()' on a null object reference
Any ideas?
G.