java Programming Glossary: blocksize
how can I convert String to SecretKey http://stackoverflow.com/questions/4551263/how-can-i-convert-string-to-secretkey cipher Cipher.getInstance AES CBC PKCS5Padding final int blockSize cipher.getBlockSize create the key final SecretKeySpec symKey.. create a method for this final byte ivData new byte blockSize final SecureRandom rnd SecureRandom.getInstance SHA1PRNG rnd.nextBytes.. System.arraycopy ivData 0 ivAndEncryptedMessage 0 blockSize System.arraycopy encryptedMessage 0 ivAndEncryptedMessage blockSize..
|