Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6842185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:04:07+00:00 2026-05-27T00:04:07+00:00

I have been checking various questions on stackoverflow and of course google, but I

  • 0

I have been checking various questions on stackoverflow and of course google, but I can’t really find any specific solution to this question:

How do I create a function in ASP Classic to encrypt and decrypt highly sensitive information in a SQL Server database? Like fx. a social security number or anything similar?

(Or is it possible to do in my SQL string?)

And yeah, I do know how to create a function with ASP 😉

And no, I just cant hash the information with SHA or MD5, because they only work one way. I need it to work both ways!

The more security, the merrier! 🙂

EDIT:
Afterwards I found this:

https://web.archive.org/web/20210728063606/https://www.4guysfromrolla.com/webtech/010100-1.shtml

But I don’t really know if this are secure enough and will do? Of which I can see, it’s going both ways?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:04:08+00:00Added an answer on May 27, 2026 at 12:04 am

    It may well be beneficial to allow SQL Server to handle the encryption/decryption using Keys/Certificates. This way, you don’t have to roll your own with ASP and the management of this system is kept where the data itself resides. There is also the benefit of not having to update this process should you decide to move to another platform.

    It is a simple process to create the Keys on the server and use of them after this point is also simple, for example;

    Encrypt;

    OPEN SYMMETRIC KEY mykey DECRYPTION BY CERTIFICATE [mycert]
    UPDATE table SET number = EncryptByKey(Key_GUID('mykey'), @number)
    

    Decrypt;

     OPEN SYMMETRIC KEY mykey DECRYPTION BY CERTIFICATE [mycert]
     SELECT CONVERT(varchar, DecryptByKey(number)) AS number FROM TABLE
    

    A good overview of this can be found here Introduction to SQL Server Encryption

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been told that this is a useful means of checking code but
I have been checking out some of the possible timers lately, and System.Threading.Timer and
I currently use Notepad++ for most of my development. I have been checking out
Have been studying the file system related classes of Adobe AIR 1.5, but so
I have been checking out some info about 64-bit driver development; I found that
I have been checking out some Rogue like games (Larn, Rogue, etc) that are
I have been solving a lot of memory leaks but have been unsuccessful in
I have been racking my brain and searching google for almost the whole day
I have been version-controlling the projects under my workspace but it never occurred to
I have been using various HTTP clients in java for getting various pieces of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.