Code example for SecretKey

Methods: getEncoded

			// Log.w(LOG, "This device doesn't support 192 bits, trying 128 bits."); 
			kgen.init(128, sr);
		SecretKey skey = kgen.generateKey();
		byte[] raw = skey.getEncoded();
		return raw;
    private void doCallback(KrollFunction callback,HashMap<String, Object> event){
		if(callback!=null){, event);
	private class AESDecryptRunnable implements Runnable
		private OutputStream _to = null;
		private InputStream _from = null;
		KrollFunction _callback = null;
		String _secret = null;
Connect your IDE to all the code out there  Get Codota for Java