Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-06-21 08:15:04 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-06-21 08:15:04 +0400
commit98dddf1380e0118cbb5969773d9fe884fda9af79 (patch)
tree0bf15e36ea62a2c0572e60b8fca614e5bcdb8a92 /core/src/main/java/org
parent10608f796e36d94c4cff21d8bf0fc96c59073627 (diff)
Update GMAC/GCM javadoc
Diffstat (limited to 'core/src/main/java/org')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/macs/GMac.java3
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/macs/GMac.java b/core/src/main/java/org/bouncycastle/crypto/macs/GMac.java
index 89a0f7e1..b34f9ea5 100644
--- a/core/src/main/java/org/bouncycastle/crypto/macs/GMac.java
+++ b/core/src/main/java/org/bouncycastle/crypto/macs/GMac.java
@@ -40,7 +40,8 @@ public class GMac implements Mac
* Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.
*
* @param macSizeBits
- * the mac size to generate, in bits. Must be a multiple of 8 and &gt;= 96 and &lt;= 128.
+ * the mac size to generate, in bits. Must be a multiple of 8 and &gt;= 32 and &lt;= 128.
+ * Sizes less than 96 are not recommended, but are supported for specialized applications.
* @param cipher
* the cipher to be used in GCM mode to generate the MAC.
*/
diff --git a/core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java b/core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java
index 5b0a220e..0d458c46 100644
--- a/core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java
+++ b/core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java
@@ -82,6 +82,10 @@ public class GCMBlockCipher
return cipher.getAlgorithmName() + "/GCM";
}
+ /**
+ * NOTE: MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.
+ * Sizes less than 96 are not recommended, but are supported for specialized applications.
+ */
public void init(boolean forEncryption, CipherParameters params)
throws IllegalArgumentException
{