By referring this im able to implement file encryption in java. And after encryption im encoding the file with base64(note: I do not want to use other libraries, ex: Base64I