Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:21:43+00:00 2026-06-18T02:21:43+00:00

I am using the following code to generate an encrypted password: class DuplicateHandler<T> implements

  • 0

I am using the following code to generate an encrypted password:

class DuplicateHandler<T> implements AsyncCallback<User> {
  public void onFailure(Throwable ex) {
    Window.alert("RPC call failed.");
  }

  public void onSuccess(User result) {
    User u = result;
    if (u == null) {
      String pw_hash = BCrypt.hashpw(passwordTextBoxEmail.getText(),
          BCrypt.gensalt());
      System.out.println("Hashed password lenth is: " + pw_hash.length());
      AsyncCallback<User> callback = new CreationHandler<User>();
      rpc.createUser(textBoxAccount.getText(), pw_hash, null, null, null,
          callback);
    } else {
      Window
          .alert("Username already in use. Please select another Username.");
    }
  }
}

And I get the following error:

[DEBUG] [org.AwardTracker.AwardTracker] - Validating units:
[INFO] [org.AwardTracker.AwardTracker] - Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] [org.AwardTracker.AwardTracker] - Module org.AwardTracker.AwardTracker has been loaded
[ERROR] [org.AwardTracker.AwardTracker] - Errors in 'file:/C:/Users/Glyndwr/Eclipse/Workspace/AwardTracker/src/org/AwardTracker/client/BCrypt.java'
[ERROR] [org.AwardTracker.AwardTracker] - Line 535: Cannot invoke clone() on the array type int[]
[ERROR] [org.AwardTracker.AwardTracker] - Line 536: Cannot invoke clone() on the array type int[]
[ERROR] [org.AwardTracker.AwardTracker] - Line 609: Cannot invoke clone() on the array type int[]
[ERROR] [org.AwardTracker.AwardTracker] - Line 706: No source code is available for type java.security.SecureRandom; did you forget to inherit a required module?
[ERROR] [org.AwardTracker.AwardTracker] - Uncaught exception escaped

15:10:39.817 [ERROR] [org.AwardTracker.AwardTracker] Uncaught exception escaped

java.lang.Error: Unresolved compilation problem: 
Cannot invoke clone() on the array type int[]

at org.AwardTracker.client.BCrypt.crypt_raw(BCrypt.java:609)
at org.AwardTracker.client.BCrypt.hashpw(BCrypt.java:682)
at org.AwardTracker.client.CreateAccountView$1$DuplicateHandler.onSuccess(CreateAccountView.java:103)
at org.AwardTracker.client.CreateAccountView$1$DuplicateHandler.onSuccess(CreateAccountView.java:1)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)

As per the documentation I have included BCrypt.java and the single line to call BCypt and return a value. I have not modified BCrypt.java.

Any help would be appreciated.

Regards,

Glyn

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:21:44+00:00Added an answer on June 18, 2026 at 2:21 am

    I wanted to do the same thing in GWT, that is, I wanted to use BCrypt on the client side; unfortunately, the java.security package has not been ported to GWT, which is why you cannot use the java.security.SecureRandom class on the client side. One solution would be to port that class yourself. My decision was to use BCrypt on the server side, and to rely on secure sockets (SSL) to protect the passwords sent from the client to the server. The packages that have been made available on the client side in GWT can be found here: JRE Emulation Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code to generate an encrypted token: var ticket =
I am using following code block to generate MD5 hashes: public static String encode(String
I am using the following code to generate a tooltip box. When a user
I am using the following code to generate excel from sql through php.this is
I am using the following code to generate a histogram chart using YUI charts:
I am using the following code to generate a Buy Now button for selling
I'm using the following code which will generate a wav file which contains a
I generate a vcard that I send to the client using the following code
I'm trying to generate the following html code using cl-who: <html> <body> <div id=cnt_1></div>
I have generated a pdf file with password protection by using the following code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.