diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-06-21 08:15:04 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-06-21 08:15:04 +0400 |
commit | 98dddf1380e0118cbb5969773d9fe884fda9af79 (patch) | |
tree | 0bf15e36ea62a2c0572e60b8fca614e5bcdb8a92 /core/src/main/java/org | |
parent | 10608f796e36d94c4cff21d8bf0fc96c59073627 (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.java | 3 | ||||
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/modes/GCMBlockCipher.java | 4 |
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 >= 96 and <= 128. + * the mac size to generate, in bits. Must be a multiple of 8 and >= 32 and <= 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 { |