mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-09-27 04:58:22 +00:00
* Crypto: Rename bouncycastle HMAC libs so they don't conflict
with older Android versions which bundle them
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user