You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2016/05/22 08:53:58 UTC
[2/3] wicket git commit: WICKET-6154 Performance bottleneck when
using KeyInSessionSunJceCryptFactory
WICKET-6154 Performance bottleneck when using KeyInSessionSunJceCryptFactory
Extract PARAMETER_SPEC constant - a PBEParameterSpec that is used by default.
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b1f21a39
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b1f21a39
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b1f21a39
Branch: refs/heads/WICKET-6154-jce-crypt-performance
Commit: b1f21a399bb0b3f66fff15dd5c502786591ca640
Parents: a338eb9
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sun May 22 10:46:59 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun May 22 10:46:59 2016 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/b1f21a39/wicket-util/src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java b/wicket-util/src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java
index 778cfb0..b702851 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/crypt/SunJceCrypt.java
@@ -53,6 +53,8 @@ public class SunJceCrypt extends AbstractCrypt
public final static byte[] SALT = { (byte)0x15, (byte)0x8c, (byte)0xa3, (byte)0x4a,
(byte)0x66, (byte)0x51, (byte)0x2a, (byte)0xbc };
+ private static final PBEParameterSpec PARAMETER_SPEC = new PBEParameterSpec(SALT, COUNT);
+
/** The name of encryption method (cipher) */
private final String cryptMethod;
@@ -141,7 +143,7 @@ public class SunJceCrypt extends AbstractCrypt
*/
protected AlgorithmParameterSpec createParameterSpec()
{
- return new PBEParameterSpec(SALT, COUNT);
+ return PARAMETER_SPEC;
}
/**