Re: [android-developers] Re: Encrypt Files
when I run the emulator it gives me an error message (the application (process com.example )has stopped unexpectedly but I gave me the code and also logcat -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Encrypt Files
I see a bunch of errors reported, but none with "the exception code" (whatever that means). If you want people to look at your problem you've got to adequately describe it. On Mar 26, 7:30 am, jaafar zbeiba wrote: > which ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Encrypt Files
logcat 03-26 13:25:57.117: INFO/DEBUG(27): debuggerd: Nov 24 2009 14:48:45 03-26 13:25:57.167: INFO/vold(26): Android Volume Daemon version 2.0 03-26 13:25:57.247: ERROR/vold(26): Error opening switch name path '/ sys/class/switch/test2' (No such file or directory) 03-26 13:25:57.247: ERROR/vold(26): Error bootstrapping switch '/sys/ class/switch/test2' (No such file or directory) 03-26 13:25:57.247: ERROR/vold(26): Error opening switch name path '/ sys/class/switch/test' (No such file or directory) 03-26 13:25:57.247: ERROR/vold(26): Error bootstrapping switch '/sys/ class/switch/test' (No such file or directory) 03-26 13:25:57.247: DEBUG/vold(26): Bootstrapping complete 03-26 13:25:57.357: DEBUG/qemud(34): entering main loop 03-26 13:25:57.567: DEBUG/qemud(34): fdhandler_accept_event: accepting on fd 10 03-26 13:25:57.567: DEBUG/qemud(34): created client 0xe078 listening on fd 8 03-26 13:25:57.597: DEBUG/qemud(34): client_fd_receive: attempting registration for service 'boot-properties' 03-26 13:25:57.597: DEBUG/qemud(34): client_fd_receive:-> received channel id 1 03-26 13:25:57.607: DEBUG/qemud(34): client_registration: registration succeeded for client 1 03-26 13:25:57.607: INFO/qemu-props(43): connected to 'boot- properties' qemud service. 03-26 13:25:57.617: INFO/qemu-props(43): received: dalvik.vm.heapsize=24m 03-26 13:25:57.617: INFO/qemu-props(43): received: qemu.sf.lcd_density=160 03-26 13:25:57.617: INFO/qemu-props(43): received: 03-26 13:25:57.617: INFO/qemu-props(43): invalid format, ignored. 03-26 13:25:58.168: DEBUG/AndroidRuntime(29): >> AndroidRuntime START << 03-26 13:25:58.168: DEBUG/AndroidRuntime(29): CheckJNI is ON 03-26 13:25:58.387: DEBUG/qemud(34): fdhandler_accept_event: accepting on fd 10 03-26 13:25:58.387: DEBUG/qemud(34): created client 0xe078 listening on fd 11 03-26 13:25:58.387: DEBUG/qemud(34): fdhandler_event: disconnect on fd 11 03-26 13:25:58.417: DEBUG/qemud(34): fdhandler_accept_event: accepting on fd 10 03-26 13:25:58.417: DEBUG/qemud(34): created client 0xe078 listening on fd 11 03-26 13:25:58.417: DEBUG/qemud(34): client_fd_receive: attempting registration for service 'gsm' 03-26 13:25:58.417: DEBUG/qemud(34): client_fd_receive:-> received channel id 2 03-26 13:25:58.427: DEBUG/qemud(34): client_registration: registration succeeded for client 2 03-26 13:25:58.877: INFO/(30): ServiceManager: 0xac38 03-26 13:25:58.898: INFO/AudioFlinger(30): AudioFlinger's thread ready to run for output 0 03-26 13:25:58.907: INFO/CameraService(30): CameraService started: pid=30 03-26 13:25:58.927: DEBUG/AndroidRuntime(29): --- registering native functions --- 03-26 13:25:59.307: INFO/Zygote(29): Preloading classes... 03-26 13:25:59.318: DEBUG/dalvikvm(29): GC freed 800 objects / 44048 bytes in 12ms 03-26 13:25:59.587: DEBUG/dalvikvm(29): GC freed 240 objects / 13920 bytes in 5ms 03-26 13:25:59.647: DEBUG/dalvikvm(29): GC freed 228 objects / 14376 bytes in 6ms 03-26 13:25:59.817: DEBUG/dalvikvm(29): GC freed 505 objects / 31896 bytes in 7ms 03-26 13:25:59.907: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libexif.so 0x0 03-26 13:25:59.918: DEBUG/dalvikvm(29): Added shared lib /system/lib/ libexif.so 0x0 03-26 13:25:59.918: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libFFTEm.so 0x0 03-26 13:25:59.927: DEBUG/dalvikvm(29): Added shared lib /system/lib/ libFFTEm.so 0x0 03-26 13:25:59.927: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libmedia_jni.so 0x0 03-26 13:26:00.107: DEBUG/dalvikvm(29): Added shared lib /system/lib/ libmedia_jni.so 0x0 03-26 13:26:00.107: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libmedia_jni.so 0x0 03-26 13:26:00.107: DEBUG/dalvikvm(29): Shared lib '/system/lib/ libmedia_jni.so' already loaded in same CL 0x0 03-26 13:26:00.107: INFO/dalvikvm(29): threadid=3: recursive native library load attempt (/system/lib/libmedia_jni.so) 03-26 13:26:00.107: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libmedia_jni.so 0x0 03-26 13:26:00.107: DEBUG/dalvikvm(29): Shared lib '/system/lib/ libmedia_jni.so' already loaded in same CL 0x0 03-26 13:26:00.107: INFO/dalvikvm(29): threadid=3: recursive native library load attempt (/system/lib/libmedia_jni.so) 03-26 13:26:00.107: DEBUG/dalvikvm(29): Trying to load lib /system/lib/ libmedia_jni.so 0x0 03-26 13:26:00.107: DEBUG/dalvikvm(29): Shared lib '/system/lib/ libmedia_jni.so' already loaded in same CL 0x0 03-26 13:26:00.107: INFO/dalvikvm(29): threadid=3: recursive native library load attempt (/system/lib/libmedia_jni.so) 03-26 13:26:00.137: DEBUG/dalvikvm(29): GC freed 323 objects / 20144 bytes in 8ms 03-26 13:26:00.637: DEBUG/dalvikvm(29): GC freed 3536 objects / 168944 bytes in 21ms 03-26 13:26:00.687: DEBUG/dalvikvm(29): GC freed 133 objects / 8640 bytes in 15ms 03-26 13:26:00.768: DEBUG/dalvikvm(29): GC freed 518 objects / 31504 bytes in 20ms 03-26 13:26:00.827: DEBUG/dalvikvm(29): GC freed 175 objects / 9456 bytes in 15ms 03-26 13:26:00.867: DEBUG/dalvikvm(29
Re: [android-developers] Re: Encrypt Files
which ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Encrypt Files
There is a solution. On Mar 26, 6:30 am, jaafar zbeiba wrote: > hello I tried this code but I have a problem with the exception > code > import java.security.*; > import javax.crypto.*; > > // > // encrypt and decrypt using the DES private key algorithm > > public class PrivateExample { > > public static void main(String[] args) throws Exception { > // > // check args and get plaintext > if (args.length != 1) { > System.err.println("Usage: java PrivateExample text"); > System.exit(1); > } > > // byte[] plainText = args[0].getBytes("UTF8"); > String ss = "Hello world, haris is here!"; > byte[] plainText = ss.getBytes(); > // > // get a DES private key > System.out.println("\nStart generating DES key"); > KeyGenerator keyGen = KeyGenerator.getInstance("DES"); > keyGen.init(56); > Key key = keyGen.generateKey(); > System.out.println("Finish generating DES key"); > // > // get a DES cipher object and print the provider > Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); > System.out.println("\n" + cipher.getProvider().getInfo()); > // > // encrypt using the key and the plaintext > System.out.println("\nStart encryption"); > cipher.init(Cipher.ENCRYPT_MODE, key); > byte[] cipherText = cipher.doFinal(plainText); > System.out.println("Finish encryption: "); > System.out.println(new String(cipherText, "UTF8")); > > // > // decrypt the ciphertext using the same key > System.out.println("\nStart decryption"); > cipher.init(Cipher.DECRYPT_MODE, key); > byte[] newPlainText = cipher.doFinal(cipherText); > System.out.println("Finish decryption: "); > > System.out.println(new String(newPlainText, "UTF8")); > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Encrypt files
Android has javax.crypto. I would utilize that to read and write encrypted files, I don't think a partition or driver will add value in this case. http://developer.android.com/reference/javax/crypto/package-summary.html Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 3:16 am, John Smith wrote: > 2009/7/7 Cyril ROQUES > > > I need to encrypt some files but the user must have access to them in > > both read/write > > > I would to create a virtual partition and mount it into a folder but how to > > link an application with a folder ? or create a driver ? > > > If this approach can’t run maybe with a live folder but I don’t know how to > > save new file into it > > > If you have idea or different approach for this problem your are welcome > > You would be best just reading and writing encrypted data, rather than > trying to mess with partitions or other things that either need root access > to do, or very low system stuff. > > While I haven't really looked into this, if JAVA itself can't do it, you can > always use the bouncycastle libs can do crypto. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Encrypt files
2009/7/7 Cyril ROQUES > I need to encrypt some files but the user must have access to them in > both read/write > > I would to create a virtual partition and mount it into a folder but how to > link an application with a folder ? or create a driver ? > > If this approach can’t run maybe with a live folder but I don’t know how to > save new file into it > > If you have idea or different approach for this problem your are welcome > You would be best just reading and writing encrypted data, rather than trying to mess with partitions or other things that either need root access to do, or very low system stuff. While I haven't really looked into this, if JAVA itself can't do it, you can always use the bouncycastle libs can do crypto. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---