Re: how to STORE encrypted string in database

2013-04-02 Thread Satyapraksh Panigrahi
Base64 never fails for any binary data. Something's wrong in your steps. As far as I understand you are using Qt, right? In Qt you have direct methods in QByteArray class for converting to Base64 String and retrieving back from it. On Mon, Apr 1, 2013 at 4:12 PM, Jevin Sonut j.so...@gmail.com

Re: how to STORE encrypted string in database

2013-04-01 Thread Jevin Sonut
hi, i have tried all the datatype in SQLite that can hold string and char (CHARACTER,VARCHAR,VARYING CHARACTER,NCHAR,NATIVE CHARACTER,NVARCHAR,TEXT,CLOB,BLOB) BUT NONE have hold the encrypted string that i'm trying to Store and retieve i even tried on to store on text file but with the same

Re: how to STORE encrypted string in database

2013-04-01 Thread Jevin Sonut
One solution i thought could work was to convert the char into int and use mode 128 to bring then in the range of ascii caracters but it consists of negative number as well which complicate thing difficult to fit in the ascii space when convert same int to char get different char A

RE: how to STORE encrypted string in database

2013-04-01 Thread Salz, Rich
Ø PLZ can someone provide a solution -- to store encrypted text in a database - SQLite?? You might have gotten all the help that the volunteers who read this list are going to give you. If you look through the archives, you might see that people here generally do not post complete source code

Re: how to STORE encrypted string in database

2013-04-01 Thread Pierre DELAAGE
Daniel Black gave the solution : I confirm that SQLLite supports BLOB, that is to say binary storage. http://www.sqlite.org/datatype3.html It is strange that it does not work... Apart from that, dummy storage of binary data as ascii is trivial (no need of any sophisticated encoding such as

RE: how to STORE encrypted string in database

2013-03-31 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Jakob Bohm Sent: Thursday, 28 March, 2013 20:53 Look up the documentation of the following OpenSSL functions (Yes this is a bit roundabout for encoding a single string, but this is all OpenSSL exposes): BIO_f_base64 BIO_s_mem A

Re: how to STORE encrypted string in database

2013-03-31 Thread Jakob Bohm
On 31-03-2013 08:49, Dave Thompson wrote: From: owner-openssl-us...@openssl.org On Behalf Of Jakob Bohm Sent: Thursday, 28 March, 2013 20:53 Look up the documentation of the following OpenSSL functions (Yes this is a bit roundabout for encoding a single string, but this is all OpenSSL exposes):

Re: how to STORE encrypted string in database

2013-03-31 Thread Daniel Black
On 29/03/13 05:24, Matthias Apitz wrote: El día Thursday, March 28, 2013 a las 01:14:35PM -0500, Salz, Rich escribió: Encrypted data is not a text string, it is an array of binary octets. You will have to do something like base64 encode/decode when treating it as a text string. Or the

how to STORE encrypted string in database

2013-03-28 Thread Jevin Sonut
hi, i have encrypted a string using Blowfish from Openssl library i got the following string A▓☼LÝ$øä²↓j╗ú¤Ä:ðï▲ i inserted the data into my database BUT when i retrieved the data i got A¦¤LÝ$øä²?j+ú¤Ä:ðï? (NOT same to the original the one i inserted) thus when i decrypt the loaded string

RE: how to STORE encrypted string in database

2013-03-28 Thread Salz, Rich
Encrypted data is not a text string, it is an array of binary octets. You will have to do something like base64 encode/decode when treating it as a text string. /r$ -- Principal Security Engineer Akamai Technology Cambridge, MA

Re: [openssl-users] how to STORE encrypted string in database

2013-03-28 Thread Erwann Abalea
Your string is not portable (it isn't even a string). Whence, storing it as a string in your database isn't a good thing to do. Try encoding it in base64 after your encryption, and store the result (which will be a clean portable string). An alternative solution is to store your encrypted value

Re: how to STORE encrypted string in database

2013-03-28 Thread Jevin Sonut
Can anyone PLZ tell me how can one do base64 encode/decode on OPENSSL PLz provide a link where can learn how to use the base64 in openssl On Thu, Mar 28, 2013 at 10:14 PM, Salz, Rich rs...@akamai.com wrote: Encrypted data is not a text string, it is an array of binary octets. You will have

Re: how to STORE encrypted string in database

2013-03-28 Thread Matthias Apitz
El día Thursday, March 28, 2013 a las 01:14:35PM -0500, Salz, Rich escribió: Encrypted data is not a text string, it is an array of binary octets. You will have to do something like base64 encode/decode when treating it as a text string. Or the OP should use a data type of the database

Re: how to STORE encrypted string in database

2013-03-28 Thread Jakob Bohm
Look up the documentation of the following OpenSSL functions (Yes this is a bit roundabout for encoding a single string, but this is all OpenSSL exposes): BIO_f_base64 BIO_s_mem A better way is to use a non-OpenSSL library to Base64 (or Base32 or Base85 or Base16 or whatever you like) the

Re: how to STORE encrypted string in database

2013-03-28 Thread Ted Byers
There is greater need for precision in what is desired. Doing a base64 encoding and storing encrypted data are two entirely different matters, required sometimes in quite different circumstances. I generally do not bother with encoding as that is not normally needed in what I do, but a 30 second

RE: how to STORE encrypted string in database

2013-03-28 Thread elaine ossipov
Byers Sent: Thursday, March 28, 2013 6:40 PM To: openssl-users@openssl.org Subject: Re: how to STORE encrypted string in database There is greater need for precision in what is desired. Doing a base64 encoding and storing encrypted data are two entirely different matters, required sometimes