public static void encryptFile ( File raw , File encryptedFile , String password ) throws IOException { byte [ ] b = readBytes ( raw ) ; String encodedImage = Base64 . encodeToString ( b , Base64 . DEFAULT ) ; byte [ ] encryptedBytes = new RNCryptorNative ( ) . encrypt ( encodedImage , password ) ; writeBytes ( encryptedFile , encryptedBytes ) ; }
Encrypts file using password