Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: encryption

  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    encryption

    Hi, I need to encrypt people's passwords that are getting stored in a database. I've been told to use the Util.pm package. I can't find any documentation on it. I know how to include it, but not how to use it, can anyone give me a little starter on encryption? Just the funtions I need to encrypt a string.
    Thanks

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What kind of encryption are you after?

    One-way (hashing - i.e. the encrypted text cannot be decoded)
    Two-way symmetrical (one key both encodes and decodes the text)
    Two-way assymetrical (there are two keys, one for encrypting and one for decrypting)

    If you're using passwords I'd personally go for hashing of the passwords myself. There's a builtin function called crypt() which does just this. What you can do then is compare the encrypted form of the password supplied for authentication purposes with the one stored in the database.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •