Encrypted code with certificate

Discussion in 'Javascript' started by webmaniac, Nov 19, 2008.

  1. webmaniac

    webmaniac Guest

    Hi I have an XML document that contains a username & password for the
    login to the web page.

    I want to know, How I can secure or Encrypt that XML document?

    Here is the xml:
    <?xml version="1.0" ?>

    Do I have to use some certificate or have to provide some key to the
    Or How I can secure my XML, so that no one can access it.

    webmaniac, Nov 19, 2008
    1. Advertisements

  2. webmaniac

    kit.ludwick Guest

    I may not understand your question entirely, but from what I gather,
    you're storing that XML file in a child directory of your web root.
    If that is the case, you won't be able to prevent other people from
    viewing it. Javascript is run client side, in the browser, so in
    order to have access to that file, it will need to be transferred to
    the client machine along with the code that uses it. Ajax and the
    like can get at it from the client machine without a local copy, but
    simply viewing your code will give up the location, and any security
    measures you have in place.

    Again, I'm not certain in what context you are posing this question.
    Perhaps you could provide some additional information? What are you
    trying to accomplish?
    kit.ludwick, Nov 19, 2008
    1. Advertisements

  3. | What questions are on-topic for comp.lang.javascript?
    | <http://jibbering.com/faq/#appropriateQuestions>

    Thomas 'PointedEars' Lahn, Nov 19, 2008
  4. There are many ways, but since this is a javascript newsgroup, here is
    a javascript function that uses the same encryption of default UNIX:
    A certificate is not applicable here; that is only to confirm the
    identity of a server. A key is common thing in cryptography (salt,
    public keys, private keys, ... depends on the algorithm of choice).
    I surmise you need to read up a bit more about encryption first. There
    are multiple de/encryption ciphers depending on what you exactly want.

    Hope this helps,
    Bart Van der Donck, Nov 20, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.