Home > Archive > SQL Server JDBC > February 2006 > AES Encryption -- Data type?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AES Encryption -- Data type?
Orwell

2006-02-17, 1:23 pm

Hi, quick question for those of you who might have done this --

We're encrypting credit cards using AES encryption and trying to put
the value into a character field within SQL Server. This works
absolutely fine unless there the encryption routine puts a NULL
character anyplace within the resulting string; then it just chokes.

Anybody done this before? Is it a limitation of the column data type?
A limitation in the JDBC driver?

Thanks in advance

Kamil Sykora [MSFT]

2006-02-25, 9:28 am

Hello Orwell,

It sounds like the data that the encryption routine returns is binary, not
character. It seems that it should be stored in a binary field rather than
a character field, would you agree? There are various issues with embedded
nulls and character fields that can be easily avoided by storing the data
in a binary field and treating them as such in the client code.

If you feel that this should work with character data, could you post why
as well as some sample code, the exception you are getting, driver version
etc?

Thanks,
Kamil

Kamil Sykora [MSFT]
Microsoft Developer Support - Webdata

This posting is provided "AS IS", with no warranties, and confers no
rights.

Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.
--------------------
| From: "Orwell" <orwellnelson@usa.com>
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Subject: AES Encryption -- Data type?
| Date: 17 Feb 2006 09:50:46 -0800
|
| Hi, quick question for those of you who might have done this --
|
| We're encrypting credit cards using AES encryption and trying to put
| the value into a character field within SQL Server. This works
| absolutely fine unless there the encryption routine puts a NULL
| character anyplace within the resulting string; then it just chokes.
|
| Anybody done this before? Is it a limitation of the column data type?
| A limitation in the JDBC driver?
|
| Thanks in advance
|
|

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com