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);
    }
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
@param raw the original file to be encrypted
@param encryptedFile the result file
@param password strong generated password
@throws IOException