Are you encountering the java issue of java not having unsigned bytes at all??? 
 If so, you should use int so that you can process an unsigned byte.  Anyways, 
just a thought.

Dean

From: Brian Tarbox <tar...@cabotresearch.com<mailto:tar...@cabotresearch.com>>
Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Wednesday, November 7, 2012 3:43 PM
To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: problem encrypting keys and data

We have a requirement to store our data encrypted.
Our encryption system turns our various strings into byte arrays.  So far so 
good.

The problem is that the bytes in our byte arrays are sometimes negative...but 
when we look at them in the cassandra-cli (or try to programatically retrieve 
them) the bytes are all positive so we of course don't find the expected data.

We have tried Byte encoding and UTF8 encoding without luck.  In looking at the 
Byte validator in particular I see nothing that ought to care about the sign of 
the bytes, but perhaps I'm missing something.

Any suggestions would be appreciated, thanks.

Brian Tarbox

Reply via email to