My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 17: Optional encrypt of a place token
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  gal.dol...@gmail.com
Closed:  Sep 2010


 
Project Member Reported by gal.dol...@gmail.com, Sep 15, 2010
Add an optional flag (maybe an annotation) to mark a place as encrypted.


Sep 16, 2010
Project Member #1 gal.dol...@gmail.com
(No comment was entered for this change.)
Status: Fixed
Sep 16, 2010
#2 amise...@gmail.com
Hello!

1. How use @PlaceDataEncrypted?

2. In PlaceManagerImpl.java:
public void onTokenChange(String token) {
...
data = typeJsonSerializer.deserialize(JSONParser.parse((encrypted ? Base64.decode(json) : json)));
...
}

Can be it is necessary to make as follows:
 - add Crypter interface with encode/decode functions, class Base64 implements Crypter
 - create any new class implements Crypter and set your own methods encode/decode
 - set Crypter class for using in 
public void onTokenChange(String token) {
...
data = typeJsonSerializer.deserialize(JSONParser.parse((encrypted ? Crypter.decode(json) : json)));
...
}

?

That will define your functions encode/decode, you can convert json format to userlike kind of link.
For example http://localhost/#example|&par1=val1&par2=val2 instead of http://localhost/#example|{"par1":"val1" "par2":"val2"}





Sep 16, 2010
Project Member #3 gal.dol...@gmail.com
A quick documentation:

If you want all your places to get encrypted:
<set-configuration-property name="app.encrypt.place"
		value="true" />

Otherwise annotate the places you want to encrypt with @PlaceDataEncrypted

The default crypter is base64. To use your own you have to turn off the default:
<set-configuration-property name="app.encrypt.base64"
		value="false" />

And bind you crypter in you gin module:
bind(Cryper.class).to(JsonToUserlikeCrypter.class);
Sep 16, 2010
#4 amise...@gmail.com
Big thanks! :)

Powered by Google Project Hosting