Tuesday, March 27, 2012
Encryption question
I have a Encryption - Decription Question.
In my project we are getting an XML File from a vendor which has a credit
card number in clear text. We use XML bulk load process to load table from
xml file.
How can i encrypt credit card number while storing into table.
Also i will have to decrypt CC number while i create comma separated file
for another vendor ?
Pls let me know.
thxA credit card number is typically not the type of attribute used for
indexing, sorting, grouping, or composing a primary key, so I see no reason
why it would not be a good candidate for encryption. It would be reasonable
and fairly simple to store it encrypted and decrypt it at the application
level only when needed for display on a customer information form or to
complete a business transaction.
However, a social security number is a different issue.
"mvp" <mvp@.discussions.microsoft.com> wrote in message
news:81898E3B-37E1-4B90-9F83-2E522A29D064@.microsoft.com...
> Hello Everybody,
> I have a Encryption - Decription Question.
> In my project we are getting an XML File from a vendor which has a credit
> card number in clear text. We use XML bulk load process to load table from
> xml file.
> How can i encrypt credit card number while storing into table.
> Also i will have to decrypt CC number while i create comma separated file
> for another vendor ?
> Pls let me know.
> thx|||I have a few line sof VB.Net code that Encrypts or Decrypts a string passed
to it; If interested then let me know and I will post the code for you.
"mvp" wrote:
> Hello Everybody,
> I have a Encryption - Decription Question.
> In my project we are getting an XML File from a vendor which has a credit
> card number in clear text. We use XML bulk load process to load table from
> xml file.
> How can i encrypt credit card number while storing into table.
> Also i will have to decrypt CC number while i create comma separated file
> for another vendor ?
> Pls let me know.
> thx|||Thanks for the reply
But can i know how can i do this encryption-decryption..
thanks
"JT" wrote:
> A credit card number is typically not the type of attribute used for
> indexing, sorting, grouping, or composing a primary key, so I see no reaso
n
> why it would not be a good candidate for encryption. It would be reasonabl
e
> and fairly simple to store it encrypted and decrypt it at the application
> level only when needed for display on a customer information form or to
> complete a business transaction.
> However, a social security number is a different issue.
> "mvp" <mvp@.discussions.microsoft.com> wrote in message
> news:81898E3B-37E1-4B90-9F83-2E522A29D064@.microsoft.com...
>
>|||I want to read from XML file (which has CC number in clear text, i use sql
bulk load to load xml into table) and load into sql server table in encrypt
form and then decrypt again when i create comma seperated file from table
again to provide feed to another vendor ?
Let me know, do u have similar thing ?
"Shariq" wrote:
> I have a few line sof VB.Net code that Encrypts or Decrypts a string passe
d
> to it; If interested then let me know and I will post the code for you.
> "mvp" wrote:
>|||If your entire input and output processing is done with SQL server then I
haven't done similar thing but you could possibly use ActiveX script to
Encrypt/Decrypt.
In a similiar type of situation when I had to encrypt/decrypt for input and
output; I use VB.Net application to re-process XML file as input, encrypted
the Credit Card numbers and output to an XML file. Then I executed a DTS
package to upload the XML formatted output file to a SQL Server.
When sending data to a client with decrypted CC numbers; I also used the VB
application to rad data from the SQL Server and during the data read,
decrypted the CC numbers and produced XML file.
"mvp" wrote:
> I want to read from XML file (which has CC number in clear text, i use sq
l
> bulk load to load xml into table) and load into sql server table in encry
pt
> form and then decrypt again when i create comma seperated file from table
> again to provide feed to another vendor ?
> Let me know, do u have similar thing ?
> "Shariq" wrote:
>|||Hello Shariq,
I'm Interesting about the encryption/decryption code that you wrote in VB.NE
T.
Would you like to post it me?
Thank you!
"Shariq" wrote:
> If your entire input and output processing is done with SQL server then I
> haven't done similar thing but you could possibly use ActiveX script to
> Encrypt/Decrypt.
> In a similiar type of situation when I had to encrypt/decrypt for input an
d
> output; I use VB.Net application to re-process XML file as input, encrypte
d
> the Credit Card numbers and output to an XML file. Then I executed a DTS
> package to upload the XML formatted output file to a SQL Server.
> When sending data to a client with decrypted CC numbers; I also used the V
B
> application to rad data from the SQL Server and during the data read,
> decrypted the CC numbers and produced XML file.
> "mvp" wrote:
>|||If you are taking about decrypting data coming in from the source data or
encrypting data as it extract to another format, then this would be
implemented at the application level not the database level. It depends on
what application programming tool your are using.
"mvp" <mvp@.discussions.microsoft.com> wrote in message
news:8470213F-47A3-417A-B920-BB7759AC0738@.microsoft.com...
> Thanks for the reply
> But can i know how can i do this encryption-decryption..
> thanks
> "JT" wrote:
>|||x-rays,
You might be able to better technique but the technique I use works great
for me.
This function will either encrypt or decrypt depanding on what is passed to
it.
Public Function MyCryption(ByVal strInput As String) As String
' Encrypts/decrypts the passed string using
' a simple ASCII value-swapping algorithm
Dim strTempChar As String, i As Integer
For i = 1 To Len(strInput)
If Asc(Mid$(strInput, i, 1)) < 128 Then
strTempChar = CType(Asc(Mid$(strInput, i, 1)) + 128, String)
ElseIf Asc(Mid$(strInput, i, 1)) > 128 Then
strTempChar = CType(Asc(Mid$(strInput, i, 1)) - 128, String)
End If
Mid$(strInput, i, 1) = Chr(CType(strTempChar, Integer))
Next i
Return strInput
End Function
"x-rays" wrote:
> Hello Shariq,
> I'm Interesting about the encryption/decryption code that you wrote in VB.
NET.
> Would you like to post it me?
> Thank you!
> "Shariq" wrote:
>|||Keep in mind that whatever encryption you end up using, the encrypted data
is only as secure as the code you use for the encryption. If your
encryption code and key are stored in a source control system, everyone with
access to that system will be able to decrypt the data, provided they have
access to the table where the data is stored.
If your programmers do not have access to the production database, and your
DBAs do not have access to your application code, then you should be ok.
"mvp" <mvp@.discussions.microsoft.com> wrote in message
news:81898E3B-37E1-4B90-9F83-2E522A29D064@.microsoft.com...
> Hello Everybody,
> I have a Encryption - Decription Question.
> In my project we are getting an XML File from a vendor which has a credit
> card number in clear text. We use XML bulk load process to load table from
> xml file.
> How can i encrypt credit card number while storing into table.
> Also i will have to decrypt CC number while i create comma separated file
> for another vendor ?
> Pls let me know.
> thx
Encryption Password
i have an question,
if we use mysql, we can encrypt our password using md5() function,
other wise, i want to encrypt my password in sql server 2000, can anyone tell me, what function i must use, and how to use it?
Thanks for all...
Quote:
Originally Posted by xpcer
Hai everybody
i have an question,
if we use mysql, we can encrypt our password using md5() function,
other wise, i want to encrypt my password in sql server 2000, can anyone tell me, what function i must use, and how to use it?
Thanks for all...
I use an Encripta stored procedure in the database that u want encrypted passwords to be in, it runs off 2 Extended stored procedures in master database, and those 2 stored procedures run off a .dll file in Program Files\Microsoft SQL Server\MSSQL\Binn
If you want the files/querys to make this happen, send me a private message :)
Wednesday, March 21, 2012
Encrypting the Configuration Settings in SSIS package
Hello Everybody,
I have developed a SSIS package to pull data from a remote SQL Server.
I have specified Database related settings in a dtsconfig file.
I was just wondering if we have any way of encrypting the config file so that only my package can read information out of it.
Or is there any other better way where i can store my database configuration (uid, pwd) so that it is not viewed by anyone.
please help me with this issude, thanks in advance...
Regards,
Sudhir Kesharwani
SSIS will not store passwords in configurations files.
Look up the ProtectionLevel property. There are a few settings there that would interest you.
sqlMonday, March 19, 2012
Encrypted Stored Procs.
I have a quick question as follows:
Does it take longer to create a stored procedure when it is encrypted versus
when it is not encrypted?
Thanks.
Regards,
Soumitra Banerjee
Hi Soumitra,
To create an encrypted Stored procedure include the keyword "With
encryption".
For more details visit the following URL :
http://msdn.microsoft.com/library/de...us/tsqlref/ts_
create_4hk5.asp
Example :
The WITH ENCRYPTION clause hides the text of a stored procedure from users.
This example creates an encrypted procedure, uses the sp_helptext system
stored procedure to get information on that encrypted procedure, and then
attempts to get information on that procedure directly from the syscomments
table.
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'encrypt_this' AND type = 'P')
DROP PROCEDURE encrypt_this
GO
USE pubs
GO
CREATE PROCEDURE encrypt_this
WITH ENCRYPTION
AS
SELECT *
FROM authors
GO
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Do you mean create as in CREATE PROCEDURE.. or in executing?
Persumably there is some tiny overhead in encrypting the text for syscomments but you won't notice it. I've never seen nor head of performance issues. Out of curiosity, why the question?
Alicia
http://www.sqlporn.co.uk
Encrypted Stored Procs.
I have a quick question as follows:
Does it take longer to create a stored procedure when it is encrypted versus
when it is not encrypted?
Thanks.
Regards,
Soumitra BanerjeeHi Soumitra,
To create an encrypted Stored procedure include the keyword "With
encryption".
For more details visit the following URL :
http://msdn.microsoft.com/library/d...-us/tsqlref/ts_
create_4hk5.asp
Example :
The WITH ENCRYPTION clause hides the text of a stored procedure from users.
This example creates an encrypted procedure, uses the sp_helptext system
stored procedure to get information on that encrypted procedure, and then
attempts to get information on that procedure directly from the syscomments
table.
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'encrypt_this' AND type = 'P')
DROP PROCEDURE encrypt_this
GO
USE pubs
GO
CREATE PROCEDURE encrypt_this
WITH ENCRYPTION
AS
SELECT *
FROM authors
GO
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.|||Do you mean create as in CREATE PROCEDURE.. or in executing?
Persumably there is some tiny overhead in encrypting the text for syscomment
s but you won't notice it. I've never seen nor head of performance issues. O
ut of curiosity, why the question?
Alicia
http://www.sqlporn.co.uk
Encrypted Stored Procs.
I have a quick question as follows:
Does it take longer to create a stored procedure when it is encrypted versus
when it is not encrypted?
Thanks.
Regards,
Soumitra BanerjeeHi Soumitra,
To create an encrypted Stored procedure include the keyword "With
encryption".
For more details visit the following URL :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
create_4hk5.asp
Example :
The WITH ENCRYPTION clause hides the text of a stored procedure from users.
This example creates an encrypted procedure, uses the sp_helptext system
stored procedure to get information on that encrypted procedure, and then
attempts to get information on that procedure directly from the syscomments
table.
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'encrypt_this' AND type = 'P')
DROP PROCEDURE encrypt_this
GO
USE pubs
GO
CREATE PROCEDURE encrypt_this
WITH ENCRYPTION
AS
SELECT *
FROM authors
GO
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.|||Do you mean create as in CREATE PROCEDURE.. or in executing
Persumably there is some tiny overhead in encrypting the text for syscomments but you won't notice it. I've never seen nor head of performance issues. Out of curiosity, why the question
Alici
http://www.sqlporn.co.uk|||It does take 'slightly' longer yes.
Personally I feel that Encryping SP is a waste of time as
the encryption SQL Server uses is not very good and can be
broken quite easily.
J
>--Original Message--
>Hi Everybody,
>I have a quick question as follows:
>Does it take longer to create a stored procedure when it
is encrypted versus
>when it is not encrypted?
>Thanks.
>Regards,
>Soumitra Banerjee
>
>.
>
Encrypted Stored Proc.
I have a quick question as follows:
Does it take longer to create a stored procedure when it is encrypted versus
when it is not encrypted?
Thanks.
Regards,
Soumitra Banerjee
Perhaps - some time will be taken up doing the encryption. I'm wondering why
you would be concerned about how long it takes to create a storred
procedure?
Jim
"Soumitra Banerjee" <sbanerjee@.epacesoftware.com> wrote in message
news:ebbglmTOEHA.2996@.TK2MSFTNGP12.phx.gbl...
> Hi Everybody,
> I have a quick question as follows:
> Does it take longer to create a stored procedure when it is encrypted
versus
> when it is not encrypted?
> Thanks.
> Regards,
> Soumitra Banerjee
>