Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7406937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:37:58+00:00 2026-05-29T05:37:58+00:00

How to make encryption and decryption on an application’s files in sd-card? so that

  • 0

How to make encryption and decryption on an application’s files in sd-card? so that i may secure the files on the sdcard and no other person will be able to access outside of that application with out decryption on those files??

Is there any person who can give me any good example source to implement the encryption on android application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:37:59+00:00Added an answer on May 29, 2026 at 5:37 am

    I have written this program that will encrypt a file using AES and decrypt the same file. This will surely help you.

    FileInputStream fis = new FileInputStream(new File("D:/Shashank/Test123.txt"));
            File outfile = new File("D:/Shashank/encTest1234.txt");
            int read;
            if(!outfile.exists())
                outfile.createNewFile();
            File decfile = new File("D:/Shashank/dec123.txt");
            if(!decfile.exists())
                decfile.createNewFile();
            FileOutputStream fos = new FileOutputStream(outfile);
            FileInputStream encfis = new FileInputStream(outfile);
            FileOutputStream decfos = new FileOutputStream(decfile);
            Cipher encipher = Cipher.getInstance("AES");
            Cipher decipher = Cipher.getInstance("AES");
            KeyGenerator kgen = KeyGenerator.getInstance("AES");
            SecretKey skey = kgen.generateKey();
            encipher.init(Cipher.ENCRYPT_MODE, skey);
            CipherInputStream cis = new CipherInputStream(fis, encipher);
            decipher.init(Cipher.DECRYPT_MODE, skey);
            CipherOutputStream cos = new CipherOutputStream(decfos,decipher);
            while((read = cis.read())!=-1)
                    {
                        fos.write((char)read);
                        fos.flush();
                    }   
            fos.close();
            while((read=encfis.read())!=-1)
            {
                cos.write(read);
                cos.flush();
            }
        cos.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using RijndaelManaged to make a simple encryption/decryption utility. This is working fine,
I wanted to make my own encryption algorithm and decryption algorithm , encryption algorithm
In C, I have a function that implements both the encryption and decryption routines
I'm using encryption in my program, that decrypts files if it needs to use
I am running a java string encryption/decryption class that i got from the internet!
I want to make an encryption function that should have some secret key. Something
I need some help from Oracle/Security experts. I'm going to make functions for encryption/decryption
Greetings all i want to know how to make good encryption and decryption for
To make click-able divs, I do: <div class=clickable url=http://google.com> blah blah </div> and then
I have made a C# application that talks to my website via PHP(mcrypt) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.