Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an encryption method for a column with a data type of int?

The scenario is that I want to encrypt finance numbers in a column with a data type of int in a sql server table. It is a big app so it is difficult to change the table column data type from int to any other data type.

I'm using sql server 2005 and asp.net C#.

Is there a two-way encryption method for a column with a data type of int?

Could I use a user-defined-function in sql server 2005 or a possibly a C# method?

like image 475
Mike108 Avatar asked Oct 15 '22 08:10

Mike108


1 Answers

I'm sorry but I simply can't see the rationale for encrypting numbers in a database. If you want to protect the data from prying eyes, surely SQL Server has security built into it, yes?

In that case, protect the database with its standard security. If not, get a better DBMS (though I'd be surprised if this were necessary).

If you have bits of information from that table that you want to make available (like some columns but not others), use a view, or a trigger to update another table (less secured), or a periodic transfer to that table.

like image 57
paxdiablo Avatar answered Oct 18 '22 02:10

paxdiablo