Examples of encryptUrlSafe()


Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

  public void testNoCrypt()
  {
    // The NoCrypt implementation does not modify the string at all
    final ICrypt crypt = new NoCrypt();

    assertEquals("test", crypt.encryptUrlSafe("test"));
    assertEquals("test", crypt.decryptUrlSafe("test"));
  }
}
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

    final ICrypt crypt = tester.getApplication()
      .getSecuritySettings()
      .getCryptFactory()
      .newCrypt();
    final String encryptedPassword = crypt.encryptUrlSafe("test");
    assertNotNull(encryptedPassword);
    cookieUsername = new Cookie("panel.signInForm.username", "juergen");
    Cookie cookiePassword = new Cookie("panel.signInForm.password", encryptedPassword);
    Cookie[] cookies = new Cookie[] { cookieUsername, cookiePassword };
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

  {
    final ICrypt crypt = new SunJceCrypt();

    try
    {
      if (crypt.encryptUrlSafe("test") != null)
      {
        final String text = "abcdefghijkABC: A test which creates a '/' and/or a '+'";
        final String expectedUrlSafeEncrypted = "g-N_AGk2b3qe70kJ0we4Rsa8getbnPLm6NyE0BCd-go0P-0kuIe6UvAYP7dlzx-9mfmPaMQ5lCk";

        final String encrypted = crypt.encryptUrlSafe(text);
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

      if (crypt.encryptUrlSafe("test") != null)
      {
        final String text = "abcdefghijkABC: A test which creates a '/' and/or a '+'";
        final String expectedUrlSafeEncrypted = "g-N_AGk2b3qe70kJ0we4Rsa8getbnPLm6NyE0BCd-go0P-0kuIe6UvAYP7dlzx-9mfmPaMQ5lCk";

        final String encrypted = crypt.encryptUrlSafe(text);
        assertEquals(expectedUrlSafeEncrypted, encrypted);
        assertEquals(text, crypt.decryptUrlSafe(expectedUrlSafeEncrypted));
        assertNull(crypt.decryptUrlSafe("style.css"));
      }
    }
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

  public void testNoCrypt()
  {
    // The NoCrypt implementation does not modify the string at all
    final ICrypt crypt = new NoCrypt();

    assertEquals("test", crypt.encryptUrlSafe("test"));
    assertEquals("test", crypt.decryptUrlSafe("test"));
  }
}
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

          // make the querystring shorter first without loosing
          // information.
          queryString = shortenUrl(queryString).toString();

          // encrypt the query string
          String encryptedQueryString = urlCrypt.encryptUrlSafe(queryString);

                    encryptedQueryString = WicketURLEncoder.QUERY_INSTANCE.encode(encryptedQueryString);

          // build the new complete url
          return new AppendingStringBuffer(urlPrefix).append("?x=").append(
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

  {
    final ICrypt crypt = new SunJceCrypt();

    try
    {
      if (crypt.encryptUrlSafe("test") != null)
      {
        final String text = "abcdefghijkABC: A test which creates a '/' and/or a '+'";
        final String expectedUrlSafeEncrypted = "g-N_AGk2b3qe70kJ0we4Rsa8getbnPLm6NyE0BCd-go0P-0kuIe6UvAYP7dlzx-9mfmPaMQ5lCk";

        final String encrypted = crypt.encryptUrlSafe(text);
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

      if (crypt.encryptUrlSafe("test") != null)
      {
        final String text = "abcdefghijkABC: A test which creates a '/' and/or a '+'";
        final String expectedUrlSafeEncrypted = "g-N_AGk2b3qe70kJ0we4Rsa8getbnPLm6NyE0BCd-go0P-0kuIe6UvAYP7dlzx-9mfmPaMQ5lCk";

        final String encrypted = crypt.encryptUrlSafe(text);
        assertEquals(expectedUrlSafeEncrypted, encrypted);
        assertEquals(text, crypt.decryptUrlSafe(expectedUrlSafeEncrypted));
        assertNull(crypt.decryptUrlSafe("style.css"));
      }
    }
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

  public void noCrypt()
  {
    // The NoCrypt implementation does not modify the string at all
    final ICrypt crypt = new NoCrypt();

    assertEquals("test", crypt.encryptUrlSafe("test"));
    assertEquals("test", crypt.decryptUrlSafe("test"));
  }
}
View Full Code Here

Examples of org.apache.wicket.util.crypt.ICrypt.encryptUrlSafe()

              // make the querystring shorter first without loosing
              // information.
            queryString = shortenUrl(queryString).toString();

            // encrypt the query string
          final String encryptedQueryString = urlCrypt.encryptUrlSafe(queryString);

          // build the new complete url
          return new AppendingStringBuffer(urlPrefix).append("?x=").append(encryptedQueryString);
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.