473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Short encryption

Hi,

I want to encrypt some short text. I've chosen Rijndael algorithm (AES)
for the encryption. The encryption process rounds the lenght of the
input string to a multiple of 16. Then I have to store the cipher
output in a database as string, with a MAXIMUM lenght of 100 chars. To
store the cipher output, I encode it to Base64 and then save it to the
database. But Base64 increases the lenght of the cipher by 33%, and
sometimes the resulting length exceeds 100 chars.

What is the best way of encrypting a string and the store it into a
database with the shortest length possible?

Thanks,
Diablo

Nov 16 '05 #1
1 4192
Try storing your cipher text as a varbinary instead of a varchar or char.
That will save you the overhead of Base64.

HTH

DalePres
MCAD, MCDBA, MCSE

"Diablo" <pa****@go.ro> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi,

I want to encrypt some short text. I've chosen Rijndael algorithm (AES)
for the encryption. The encryption process rounds the lenght of the
input string to a multiple of 16. Then I have to store the cipher
output in a database as string, with a MAXIMUM lenght of 100 chars. To
store the cipher output, I encode it to Base64 and then save it to the
database. But Base64 increases the lenght of the cipher by 33%, and
sometimes the resulting length exceeds 100 chars.

What is the best way of encrypting a string and the store it into a
database with the shortest length possible?

Thanks,
Diablo

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cliff | last post by:
We are trying to connect to 3 different Oracle databases using MS Access as the front-end and ODBC as the connection. The problem that we are having is that 1 of the databases requires a...
113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
2
by: Sumit Gupta | last post by:
Can anyone please tell me how to encrpt string or any kind of Data. Also the Algorithm of Compression. Any Link tutorial etc. Like : Zip or RAR Formats etc.
9
by: sweety | last post by:
Dear All, How to encrypt a C data file and make binary file and then have to read a bin file at run time and decrypt the file and have to read the data. Any help to achive this pls. Would be...
3
by: Mythran | last post by:
I have googled and tested and tried and still I can't seem to implement a simple encryption/decryption console application. My goal is to create two methods. public byte Encrypt(string...
1
by: =?Utf-8?B?bWljcm9ob2Y=?= | last post by:
Short version: Is there a way to configure (preferably programmatically) the max encryption strength that will be used by the framework when connecting to a particular SSL-protected web service? ...
11
by: John Williams | last post by:
I've written a simple program to do XOR encryption as my first foray into understanding how encryption works. The code compiles fine, however it segmentation faults on every run. using gdb to...
22
by: j1mb0jay | last post by:
I have had to create a simple string encryption program for coursework, I have completed the task and now have to do a write up on how it could be improved at a later date. If you could look...
12
by: erikcw | last post by:
Hi, I'm trying to devise a scheme to encrypt/obfuscate a short string that basically contains the user's username and record number from the database. I'm using this encrypted string to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.