?
Solved

Encrypted password in xml file

Posted on 2008-11-05
9
Medium Priority
?
1,654 Views
Last Modified: 2012-05-06
how to embed a encrypted password into xml file and retrieve it.I do have the encryption function but once the application is invoked the encrypted password is distored. Any idea how to keep the same..
0
Comment
Question by:ajaypappan
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 2

Assisted Solution

by:GarethM
GarethM earned 300 total points
ID: 22891322
Maybe you could store the encrypted value in the XML as a hex representation?

Can you expand a little bit on your question, please, then I may be able to help more.
0
 
LVL 38

Accepted Solution

by:
Rich Rumble earned 600 total points
ID: 22891831
Is it a standard hash (one way encryption)?
For example: pass1234   equals...
MD5            B4AF804009CB036A4CCDC33431EF9AC9
SHA-1            789B49606C321C8CF228D17942608EFF0CCC4171
SHA-2 (256)      BD94DCDA26FCCB4E68D6A31F9B5AAC0B571AE266D822620E901EF7EBE3A11D4F
SHA-2 (384)      16C8D6427046CB9916A4415FB0402010B812E8B653EEC34FE936925D38C7F1FD24815E7816613F1E83707C8444D0C83A
SHA-2 (512)      B66DD5A7A689F88E302AB2AE4A9567F9C7572C18E520B3BF712BB2630B3931A503D647BAEDF48DF470006312D07984216578B60526E5EE6137EF1FD215190A0C
RIPEMD-160      E312CE59FC849A35E0E56951DF4A66E272251546
NT            8034586795EBAF0427CC3417EBEA341C
MySQLSHA1      34FD07B148CCA9FCB2BE6C2EA20689053E748B13

We will need to know what an example value looks like without the application going, and what it looks like when the app is envoked.
-rich
0
 
LVL 3

Author Comment

by:ajaypappan
ID: 22897199
Private Const MS_DEF_PROV = "Microsoft Base Cryptographic Provider v1.0"
Private Const PROV_RSA_FULL = 1
Private Const ALG_CLASS_DATA_ENCRYPT = 24576
Private Const ALG_CLASS_HASH = 32768

Private Const ALG_TYPE_ANY = 0
Private Const ALG_TYPE_BLOCK = 1536
Private Const ALG_TYPE_STREAM = 2048

Private Const ALG_SID_RC2 = 2

Private Const ALG_SID_RC4 = 1
Private Const ALG_SID_MD5 = 3
Private Const CALG_MD5 = ((ALG_CLASS_HASH Or ALG_TYPE_ANY) Or ALG_SID_MD5)
Private Const CALG_RC2 = ((ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_BLOCK) Or ALG_SID_RC2)
Private Const CALG_RC4 = ((ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_STREAM) Or ALG_SID_RC4)

Private Const ENCRYPT_ALGORITHM = CALG_RC4
Private Const ENCRYPT_BLOCK_SIZE = 1

Private Const CRYPT_EXPORTABLE = 1
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Author Comment

by:ajaypappan
ID: 22899333
Rich it looks like the app is using RC4 algorithm
GarethM if its hex how to wrap it up?
0
 
LVL 13

Assisted Solution

by:Kelvin_King
Kelvin_King earned 600 total points
ID: 22916864
What is the application doing?

Are you saying that the application is supposed to encrypt a password and store it into an XML file?
0
 
LVL 3

Author Comment

by:ajaypappan
ID: 22921053
this application uses xml file for grids and when i copy a encrypted passoword to the xml and save it .It should not change the characters.

Now when i reopen the application, and try to rerun the application it crashes at the password, cause the password changed..
No idea y just saving and reopening the opening crashes it..
0
 
LVL 13

Expert Comment

by:Kelvin_King
ID: 22931790
Is it possible that you can post the code for the part of the application that is saving to the XML file?

Most likely it's a formatting issue.
0
 

Expert Comment

by:ajaypap
ID: 23000747
please close this question as i found another way to solve the problem, by copying the string in a file and opening the file and reading it from there using file object
0
 

Expert Comment

by:ajaypap
ID: 23000752
please refund points too
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Encryption for Business Encryption (https://en.wikipedia.org/wiki/Encryption) ensures the safety of our data when sending emails. In most cases, to read an encrypted email you must enter a secret key that will enable you to decrypt the email. T…
This article covers the basics of data encryption, what it is, how it works, and why it's important. If you've ever wondered what goes on when you "encrypt" data, you can look here to build a good foundation for your personal learning.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question