android Programming Glossary: keygenerator
Java SimpleCrypto Class for encryption / decryption producing different results in Coldfusion 9 and Java (Android) http://stackoverflow.com/questions/11418336/java-simplecrypto-class-for-encryption-decryption-producing-different-results import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec.. private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Encryption error on Android 4.2 http://stackoverflow.com/questions/13383006/encryption-error-on-android-4-2 javax.crypto.IllegalBlockSizeException import javax.crypto.KeyGenerator import javax.crypto.NoSuchPaddingException import javax.crypto.SecretKey.. static byte getRawKey throws NoSuchAlgorithmException KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. throws NoSuchAlgorithmException KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Android 4.2 broke my AES encrypt/decrypt code http://stackoverflow.com/questions/13389870/android-4-2-broke-my-aes-encrypt-decrypt-code import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec.. private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Android 4.2 broke my encrypt/decrypt code and the provided solutions don't work http://stackoverflow.com/questions/13433529/android-4-2-broke-my-encrypt-decrypt-code-and-the-provided-solutions-dont-work static byte encrypt byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance.. byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance.. static byte decrypt byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance..
BouncyCastle AES error when upgrading to 1.45 http://stackoverflow.com/questions/4405334/bouncycastle-aes-error-when-upgrading-to-1-45 using the following to generate raw keys from a passphrase KeyGenerator kgen KeyGenerator.getInstance AES BC SecureRandom sr SecureRandom.getInstance.. to generate raw keys from a passphrase KeyGenerator kgen KeyGenerator.getInstance AES BC SecureRandom sr SecureRandom.getInstance..
Securing media files in the mobile http://stackoverflow.com/questions/6676574/securing-media-files-in-the-mobile import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec.. getRawKey byte seed throws EncrypterException try final KeyGenerator kgen KeyGenerator.getInstance AES final SecureRandom sr SecureRandom.getInstance.. seed throws EncrypterException try final KeyGenerator kgen KeyGenerator.getInstance AES final SecureRandom sr SecureRandom.getInstance..
android encryption/decryption with AES http://stackoverflow.com/questions/6788018/android-encryption-decryption-with-aes b baos.toByteArray byte keyStart this is a key .getBytes KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. byte keyStart this is a key .getBytes KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Encrypt with Node.js Crypto module and decrypt with Java (in Android app) http://stackoverflow.com/questions/7787773/encrypt-with-node-js-crypto-module-and-decrypt-with-java-in-android-app private static byte getRawKey String seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. getRawKey String seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Encrypt and decrypt data for Android app-client http://stackoverflow.com/questions/8397213/encrypt-and-decrypt-data-for-android-app-client import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec.. private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
What are best practices for using AES encryption in Android? http://stackoverflow.com/questions/8622367/what-are-best-practices-for-using-aes-encryption-in-android import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec.. private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance.. getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG..
Encryption of video files? http://stackoverflow.com/questions/9496447/encryption-of-video-files AES Cipher decipher Cipher.getInstance AES KeyGenerator kgen KeyGenerator.getInstance AES byte key 0x00 0x32 0x22 0x11.. Cipher decipher Cipher.getInstance AES KeyGenerator kgen KeyGenerator.getInstance AES byte key 0x00 0x32 0x22 0x11 0x00 0x00 0x00..
Java SimpleCrypto Class for encryption / decryption producing different results in Coldfusion 9 and Java (Android) http://stackoverflow.com/questions/11418336/java-simplecrypto-class-for-encryption-decryption-producing-different-results the source code for SimpleCrypto.java import java.security.SecureRandom import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec Usage pre String crypto SimpleCrypto.encrypt masterpassword.. byte result decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192.. decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192 and 256 bits may..
Encryption error on Android 4.2 http://stackoverflow.com/questions/13383006/encryption-error-on-android-4-2 import javax.crypto.Cipher import javax.crypto.IllegalBlockSizeException import javax.crypto.KeyGenerator import javax.crypto.NoSuchPaddingException import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec Util class.. @return the raw key @throws NoSuchAlgorithmException private static byte getRawKey throws NoSuchAlgorithmException KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed KEY.getBytes kgen.init 128.. key @throws NoSuchAlgorithmException private static byte getRawKey throws NoSuchAlgorithmException KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed KEY.getBytes kgen.init 128 sr SecretKey skey..
Android 4.2 broke my AES encrypt/decrypt code http://stackoverflow.com/questions/13389870/android-4-2-broke-my-aes-encrypt-decrypt-code encrypted Here is my class import java.security.SecureRandom import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec import android.util.Base64 public class EncodeDecodeAES.. byte result decrypt rawKey encrypted return result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed try kgen.init 256 sr.. decrypt rawKey encrypted return result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed try kgen.init 256 sr catch Exception e..
Android 4.2 broke my encrypt/decrypt code and the provided solutions don't work http://stackoverflow.com/questions/13433529/android-4-2-broke-my-encrypt-decrypt-code-and-the-provided-solutions-dont-work is quite simple and was working until Android 4.2 public static byte encrypt byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance SHA1PRNG secrand.setSeed seed.getBytes.. was working until Android 4.2 public static byte encrypt byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance SHA1PRNG secrand.setSeed seed.getBytes keygen.init 128 secrand.. skeySpec return cipher.doFinal data public static byte decrypt byte data String seed throws Exception KeyGenerator keygen KeyGenerator.getInstance AES SecureRandom secrand SecureRandom.getInstance SHA1PRNG secrand.setSeed seed.getBytes..
BouncyCastle AES error when upgrading to 1.45 http://stackoverflow.com/questions/4405334/bouncycastle-aes-error-when-upgrading-to-1-45 Cipher.java 1090 EDIT More about this issue. I am using the following to generate raw keys from a passphrase KeyGenerator kgen KeyGenerator.getInstance AES BC SecureRandom sr SecureRandom.getInstance SHA1PRNG Crypto sr.setSeed seed kgen.init.. 1090 EDIT More about this issue. I am using the following to generate raw keys from a passphrase KeyGenerator kgen KeyGenerator.getInstance AES BC SecureRandom sr SecureRandom.getInstance SHA1PRNG Crypto sr.setSeed seed kgen.init 128 sr SecretKey skey..
Securing media files in the mobile http://stackoverflow.com/questions/6676574/securing-media-files-in-the-mobile import java.io.IOException import java.security.SecureRandom import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec public class AESEncrypter public static void encryptToBinaryFile.. e throw new EncrypterException e private static byte getRawKey byte seed throws EncrypterException try final KeyGenerator kgen KeyGenerator.getInstance AES final SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128.. new EncrypterException e private static byte getRawKey byte seed throws EncrypterException try final KeyGenerator kgen KeyGenerator.getInstance AES final SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192 and 256 bits..
android encryption/decryption with AES http://stackoverflow.com/questions/6788018/android-encryption-decryption-with-aes 100 baos bm is the bitmap object byte b baos.toByteArray byte keyStart this is a key .getBytes KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed keyStart kgen.init 128 sr.. 100 baos bm is the bitmap object byte b baos.toByteArray byte keyStart this is a key .getBytes KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed keyStart kgen.init 128 sr 192 and 256 bits..
Encrypt with Node.js Crypto module and decrypt with Java (in Android app) http://stackoverflow.com/questions/7787773/encrypt-with-node-js-crypto-module-and-decrypt-with-java-in-android-app new String decrypted the raw key is created like this private static byte getRawKey String seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG byte seedBytes seed.getBytes sr.setSeed.. the raw key is created like this private static byte getRawKey String seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG byte seedBytes seed.getBytes sr.setSeed seedBytes kgen.init..
Encrypt and decrypt data for Android app-client http://stackoverflow.com/questions/8397213/encrypt-and-decrypt-data-for-android-app-client can be decrypted. package com.xxx import java.security.SecureRandom import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec Usage pre String crypto SimpleCrypto.encrypt masterpassword.. byte result decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192.. decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192 and 256 bits may..
What are best practices for using AES encryption in Android? http://stackoverflow.com/questions/8622367/what-are-best-practices-for-using-aes-encryption-in-android td4344194.html Implementation #2 import java.security.SecureRandom import javax.crypto.Cipher import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec Usage pre String crypto SimpleCrypto.encrypt masterpassword.. byte result decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192.. decrypt rawKey enc return new String result private static byte getRawKey byte seed throws Exception KeyGenerator kgen KeyGenerator.getInstance AES SecureRandom sr SecureRandom.getInstance SHA1PRNG sr.setSeed seed kgen.init 128 sr 192 and 256 bits may..
Encryption of video files? http://stackoverflow.com/questions/9496447/encryption-of-video-files decfos new FileOutputStream decfile Cipher encipher Cipher.getInstance AES Cipher decipher Cipher.getInstance AES KeyGenerator kgen KeyGenerator.getInstance AES byte key 0x00 0x32 0x22 0x11 0x00 0x00 0x00 0x00 0x00 0x23 0x00 0x00 0x00 0x00 0x00 0x00.. decfile Cipher encipher Cipher.getInstance AES Cipher decipher Cipher.getInstance AES KeyGenerator kgen KeyGenerator.getInstance AES byte key 0x00 0x32 0x22 0x11 0x00 0x00 0x00 0x00 0x00 0x23 0x00 0x00 0x00 0x00 0x00 0x00 0x00 SecretKey..
|