* Crypto: Rename bouncycastle HMAC libs so they don't conflict

with older Android versions which bundle them
This commit is contained in:
zzz
2012-08-23 19:11:55 +00:00
parent e3e15850bb
commit 5ffefd2a19
11 changed files with 40 additions and 18 deletions
@@ -4,12 +4,12 @@ import gnu.crypto.hash.Sha256Standalone;
import net.i2p.I2PAppContext;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.macs.I2PHMac;
import org.bouncycastle.oldcrypto.Digest;
import org.bouncycastle.oldcrypto.macs.I2PHMac;
/**
* Calculate the HMAC-SHA256 of a key+message. All the good stuff occurs
* in {@link org.bouncycastle.crypto.macs.I2PHMac} and
* in {@link org.bouncycastle.oldcrypto.macs.I2PHMac} and
* {@link gnu.crypto.hash.Sha256Standalone}.
*
* This should be compatible with javax.crypto.Mac.getInstance("HmacSHA256")
@@ -16,13 +16,13 @@ import net.i2p.data.Hash;
import net.i2p.data.SessionKey;
import net.i2p.util.SimpleByteCache;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.macs.I2PHMac;
import org.bouncycastle.oldcrypto.digests.MD5Digest;
import org.bouncycastle.oldcrypto.macs.I2PHMac;
/**
* Calculate the HMAC-MD5-128 of a key+message. All the good stuff occurs
* in {@link org.bouncycastle.crypto.macs.I2PHMac} and
* {@link org.bouncycastle.crypto.digests.MD5Digest}.
* in {@link org.bouncycastle.oldcrypto.macs.I2PHMac} and
* {@link org.bouncycastle.oldcrypto.digests.MD5Digest}.
*
* Keys are always 32 bytes.
* This is used only by UDP.