1

Hi I was wondering if anybody would know the best way to encrypt a file before I send it to the server and then how to unencrypt it once on the server? Files could be txt or jpg...I dont know much about encryption..thanks

3 Answers 3

2

You can check the developer documentation for Cipher here. That list should be sufficient for your needs. Also, check this question here for guidance on how to use the API.

Sign up to request clarification or add additional context in comments.

4 Comments

Do you know how i could use this to encrypt a whole file?
I used this to encrypt and image...however when i decrypt it it is corrupt? does this mean i can not encrypt my images?
@Usmaan: No, getting a corrupt image means something went wrong. Why don't you edit your question and place the code you have written there in addition to the existing question. It would help debug.
@Usmaan: Were you able to complete it? Where did the error lie?
0

It depends on the purpose of your encryption.

If you just want it to be sent securely, i.e. you want to secure the communication of the data, then just use an HTTPS API connection.

If you write your own encryption code in the app to encrypt on the device itself, someone can reverse-engineer the app, and use your code to write a decrypter, so it's never going to be very secure.

3 Comments

hmmm i have imported import javax.net.ssl.HttpsURLConnection; and tried to implement this but for some reason my files are not being sent to the server, or not being received should i say ?
I don't have a certificate i believe
For HTTPS connections, you need to ensure that there is a secure certificate installed on the web server. You can buy them for about $100, and you can also create test certificates on web servers (how will depend on what web server you are using). For a production environment, you will definitely need to buy a certificate.
0

If your looking for an easy to use encryption program to protect your files try Sensiguard www.sensiguard.com Rated as the easiest to use product, you can encrypt your personal files easily and safely. fully integrated into windows explorer. Use the USB Vault software that comes with sensiguard to encrypt files that you can decrypt at location. (note for the vault you might need the microsoft c++ redistributables 2010

2 Comments

Hmmmm is there something similar which is free
ideally i just want to put the sd card into machine and encrypt it so if it is stolen nobody can get into it. However i still want applications to be able to save things to it on the android phone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.