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 8509925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:33:57+00:00 2026-06-11T03:33:57+00:00

I have to write a standalone java program to decrypt password from file,using Symmetric

  • 0

I have to write a standalone java program to decrypt password from file,using Symmetric key for password decryption. I didn’t work with encryption and decryption before. can anybody give any suggestion how can i do this.I need your guidance.

  • 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-06-11T03:33:59+00:00Added an answer on June 11, 2026 at 3:33 am

    maybe you need something like this

        private static final String ALGORITHM = "AES";
        ....
        ....
        Key key = new SecretKeySpec(new String("here is your symmetric key").getBytes(), ALGORITHM);
        Cipher c = Cipher.getInstance(ALGORITHM);
        //dencript mode (passes the key)
        c.init(Cipher.DECRYPT_MODE, key);
        //Decode base64 to get bytes 
        byte[] encBytes  = new BASE64Decoder().decodeBuffer(encryptedValue);
        // Decrypt 
        byte[] plainTxtBytes  = c.doFinal(encBytes);
        // Decode
        String decryptedValue = new String(plainTxtBytes , "UTF-8");
    

    Here are some resources:

    1. http://www.javamex.com/tutorials/cryptography/symmetric.shtml

    2. http://www.java2s.com/Code/Java/Security/EncryptionandDecryptionusingSymmetricKeys.htm

    3. http://www.flexiprovider.de/examples/ExampleCrypt.html (This uses files as well)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a standalone Java application which will have a embedded HTTP
We have 2 java web apps both are read/write and 3 standalone java read/write
I have written a standalone Java application that I've packaged into a jar file
I have write this code but it does work only if I am already
I am trying to check if I have write access to a specific key
i have to write in a file 4bytes representing an integer in little endian
I have written code in Java to merge two xml file, the first file
We have jboss logging enabled in our application. Currently we are using the 'Rotating-file-handler'
My client is a standalone java program that wants to communicates with a servlet
I have a stand-alone java application that makes some database read/write business on a

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.