Encrypted password in xml file

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..
LVL 3
ajaypappanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GarethMCommented:
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.
Rich RumbleSecurity SamuraiCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ajaypappanAuthor Commented:
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
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

ajaypappanAuthor Commented:
Rich it looks like the app is using RC4 algorithm
GarethM if its hex how to wrap it up?
Kelvin_KingCommented:
What is the application doing?

Are you saying that the application is supposed to encrypt a password and store it into an XML file?
ajaypappanAuthor Commented:
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..
Kelvin_KingCommented:
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.
ajaypapCommented:
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
ajaypapCommented:
please refund points too
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Encryption

From novice to tech pro — start learning today.