Re: B64 Decode issues (C)

2010-08-05 Thread Marc Phillips
> If you want to encrypt a database, have you considered SQLCipher > (http://www.zetetic.net/code/sqlcipher)? It is free and uses OpenSSL. I'm not encrypting it (the data is encrypted via the app already anyway), I'm simply b64 encoding it; thanks though, this might be useful for other things.

Re: B64 Decode issues (C)

2010-08-05 Thread Marc Phillips
Ger Hobbelt wrote: > Got some sample data to show which makes the bugger fail? sqlite3 /tmp/MyTestsqlite.db SQLite version 3.3.6 Enter ".help" for instructions sqlite> CREATE TABLE test (id INTEGER primary key AUTOINCREMENT, test TEXT); sqlite> .quit encode: bmem = BIO_new(BIO_s_mem()); b64 = BI

Re: B64 Decode issues (C)

2010-08-04 Thread Marc Phillips
> I'm not sure quite what you mean here. bio_b64 by default > adds \n linebreaks every 64 chars when encoding (output) I mean if try to decode, it stops 15 bytes in. If I read the original file, and print out byte 15, it's a \n. I tried using BIO_FLAGS_BASE64_NO_NL, which then failes on encode

B64 Decode issues (C)

2010-08-03 Thread Marc Phillips
I'm having an issue with using base64 decode. I can encode fine, and can decode strings just fine, but am having an issue decoding (specifically) a sqlite database. Here's my encode and decode: encode: bmem = BIO_new(BIO_s_mem()); b64 = BIO_push(b64, bmem); fprintf(stderr,"inbuf = %s, inlen =