propagate from branch 'i2p.i2p' (head 6ab0f64b9f4992591ed989f8d89a859fc3ceaeaf)

to branch 'i2p.i2p.zzz.android' (head e02886e19d254dac40a7f775e102e60560efe5e5)
This commit is contained in:
zzz
2009-08-09 14:34:21 +00:00
16 changed files with 793 additions and 25 deletions

View File

@@ -42,8 +42,12 @@ import org.bouncycastle.crypto.Mac;
* a frequently used buffer (called on doFinal). changes released into the public
* domain in 2005.
*
* This is renamed from HMac because the constructor HMac(digest, sz) does not exist
* in the standard bouncycastle library, thus it conflicts in JVMs that contain the
* standard library (Android).
*
*/
public class HMac
public class I2PHMac
implements Mac
{
private final static int BLOCK_LENGTH = 64;
@@ -56,12 +60,12 @@ implements Mac
private byte[] inputPad = new byte[BLOCK_LENGTH];
private byte[] outputPad = new byte[BLOCK_LENGTH];
public HMac(
public I2PHMac(
Digest digest)
{
this(digest, digest.getDigestSize());
}
public HMac(
public I2PHMac(
Digest digest, int sz)
{
this.digest = digest;