java.security

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

java.security

Postby rationalblue » Tue Aug 11, 2009 6:10 am

The following class file represents a beginning attempt to develop a service to encrypt a password. This file cannot locate the import -- java.security.MessageDigest -- which I believe is incorporated as part of the currently installed jre6. I presume it is a configuration issue on my end -- possibly having to do with security policy. Can you provide a distilled example of how to config GWTDesigner to utilize java.security.*?

ERROR: In the following CODE, MessageDigest is flagged with this error --
java.security.MessageDigest can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly.

CODE SNIPPET:

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public final class PasswordService
{
public PasswordService()
{
}
public byte[] encrypt(String x) throws Exception {
MessageDigest d = null;
d = MessageDigest.getInstance("SHA-1");
d.reset();
d.update(x.getBytes());
return d.digest();
}
}
rationalblue
 
Posts: 11
Joined: Thu Apr 05, 2007 2:41 pm
Location: Maryland

Re: java.security

Postby Eric Clayberg » Tue Aug 11, 2009 7:08 am

Is java.security even allowed in GWT client code? You probably need to use that only in your server side code.

See... http://code.google.com/p/google-web-too ... eEmulation
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: java.security

Postby rationalblue » Tue Aug 11, 2009 7:22 am

You are correct and I'm a dummy, I admit it. Thanks for the quick response. Always a good idea to check the jre emulation list before whining, huh?
rationalblue
 
Posts: 11
Joined: Thu Apr 05, 2007 2:41 pm
Location: Maryland

Re: java.security

Postby Eric Clayberg » Tue Aug 11, 2009 8:04 am

rationalblue wrote:Always a good idea to check the jre emulation list before whining, huh?

Sure ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest