From 94af6550fa8188af1913111fe8f688746b7de2b0 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 2 Jun 2011 13:30:33 +0000 Subject: [PATCH] HMAC256 is used by Syndie --- core/java/src/net/i2p/I2PAppContext.java | 4 ++-- core/java/src/net/i2p/crypto/HMAC256Generator.java | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/java/src/net/i2p/I2PAppContext.java b/core/java/src/net/i2p/I2PAppContext.java index b54ca7969..fa352ada6 100644 --- a/core/java/src/net/i2p/I2PAppContext.java +++ b/core/java/src/net/i2p/I2PAppContext.java @@ -687,14 +687,14 @@ public class I2PAppContext { } } - /** @deprecated unused */ + /** @deprecated used only by syndie */ public HMAC256Generator hmac256() { if (!_hmac256Initialized) initializeHMAC256(); return _hmac256; } - /** @deprecated unused */ + /** @deprecated used only by syndie */ private void initializeHMAC256() { synchronized (this) { if (_hmac256 == null) { diff --git a/core/java/src/net/i2p/crypto/HMAC256Generator.java b/core/java/src/net/i2p/crypto/HMAC256Generator.java index 3fc554639..a4f541e34 100644 --- a/core/java/src/net/i2p/crypto/HMAC256Generator.java +++ b/core/java/src/net/i2p/crypto/HMAC256Generator.java @@ -13,9 +13,12 @@ import org.bouncycastle.crypto.macs.I2PHMac; /** * Calculate the HMAC-SHA256 of a key+message. All the good stuff occurs * in {@link org.bouncycastle.crypto.macs.I2PHMac} and - * {@link org.bouncycastle.crypto.digests.MD5Digest}. + * {@link net.i2p.crypto.Sha256Standalone}. * - * deprecated unused + * This should be compatible with javax.crypto.Mac.getInstance("HmacSHA256") + * but that is untested. + * + * deprecated used only by syndie */ public class HMAC256Generator extends HMACGenerator { public HMAC256Generator(I2PAppContext context) { super(context); }