Results 1 to 6 of 6
  1. #1
    princess-1 is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    5

    encrypting passwords in a SQL statement using c++

    Hi i am creating a login application in visual c++. the program asks for users to input their desired username and password to register, these values then go into a access database under columns 'username' and 'password'. the only problem is i want to secure my database by encrypting the passwords that go into the password column.
    So my question is does anyone know how to encrypt passwords going into a Access database using c++?? is it correct that i will have to implement the encryption code in the SQL statement and if so how do i do this because i am using parameters??
    thanks in advance.
    Last edited by princess-1; 12-26-2010 at 07:39 PM.

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    The way I handle this in VBA is to create an encryption function. I call the function to encrypt a passed string. I place the encrypted string return by the function into the SQL statement that I build in code.

    JET/ACE database engine will just save whatever you pass to it.

  3. #3
    princess-1 is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    5
    Quote Originally Posted by HiTechCoach View Post
    The way I handle this in VBA is to create an encryption function. I call the function to encrypt a passed string. I place the encrypted string return by the function into the SQL statement that I build in code.

    JET/ACE database engine will just save whatever you pass to it.
    hi, thanks for your reply. how did you code this, like what code did you use to encrypt the string? and how'd you do it so it encrypts the input string the user enters in the password textbox?

    *what did you declare your encrpyt password function has? bool? char? or int and or what was it's return type? i am abit confused as to which to use.
    Last edited by princess-1; 10-21-2010 at 10:13 AM.

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    See if this helps:

    Cryptography Code


  5. #5
    princess-1 is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    5
    Quote Originally Posted by HiTechCoach View Post
    See if this helps:

    Cryptography Code
    thank you!

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by princess-1 View Post
    thank you!
    You're welcome.

    May you have great success with your project ...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. If Then Statement Help
    By Kapelluschsa in forum Programming
    Replies: 5
    Last Post: 08-11-2010, 09:24 AM
  2. Problem with encrypting splitted database
    By skiper in forum Security
    Replies: 2
    Last Post: 02-01-2010, 11:06 AM
  3. IIF statement
    By james1982 in forum Access
    Replies: 1
    Last Post: 07-20-2009, 09:38 AM
  4. how to use IF then statement
    By ronnie4 in forum Access
    Replies: 1
    Last Post: 03-17-2009, 11:32 PM
  5. Setting up User names and passwords
    By knightjp in forum Security
    Replies: 2
    Last Post: 02-05-2009, 10:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums