Hi,
I'm encrypting the string like this...

  private static String encryptString(String str) {
               StringBuffer sb = new StringBuffer(str);
               int lenStr = str.length();
               int lenKey = key.length();
               for (int i = 0, j = 0; i < lenStr; i++, j++) {
                       if (j >= lenKey) {
                               j = 0;
                       }
                       sb.setCharAt(i, (char) (str.charAt(i) ^
key.charAt(j)));
               }

               return sb.toString();
       }

...and save the string using low-level datastore api for Java (simply
setting the property on an entity and putting it to the datastore).
I've used this for many months now, but since a few days(?) I'm not
able to load the strings back from the datastore.
So I guess that something under the hood must have been changed with
the string encoding.
I could of course do some Base64 in the future but that will still not
help me to get back the strings from the datastore that are already
stored :-(

Daniel


On 17 Jun., 19:31, "Ikai L (Google)" <ika...@google.com> wrote:
> From an off-list email - looks like you are having issues when you try to
> view the entities, since you did an XOR on the String.
>
> The error is happening when the String is being converted to UTF8. Can you
> post the code demonstrating how you are saving the Strings?
>
> On Thu, Jun 17, 2010 at 10:11 AM, Ikai L (Google) <ika...@google.com> wrote:
>
>
>
>
>
> > Can you post reproduction steps? What do you mean when you say you get
> > strange results?
>
> > On Thu, Jun 17, 2010 at 8:58 AM, dflorey <daniel.flo...@gmail.com> wrote:
>
> >> I'm in trouble, because some of my datastore entities are not
> >> accessible anymore. I can request them using queries, but when trying
> >> to access certain properties, I get strange results.
> >> When trying to open these entities from the datastore viewer I get 500
> >> errors.
> >> Any ideas? I've the feeling that it has to do with encoded Strings
> >> that I'm storing. Has something in the encoding been changed recently?
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-appeng...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine+unsubscr...@googlegroups.com<google-appengine%2Bunsubscrib
> >>  e...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blog:http://googleappengine.blogspot.com
> > Twitter:http://twitter.com/app_engine
> > Reddit:http://www.reddit.com/r/appengine
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to