SEC-1730: Fix broken KeyGenerators method.

This commit is contained in:
Luke Taylor
2011-04-26 19:06:45 +01:00
parent e473897fd9
commit 73fb1764b8
2 changed files with 15 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ public class KeyGenerators {
* @param keyLength the key length in bytes, e.g. 16, for a 16 byte key.
*/
public static BytesKeyGenerator shared(int keyLength) {
return new SharedKeyGenerator(secureRandom(16).generateKey());
return new SharedKeyGenerator(secureRandom(keyLength).generateKey());
}
/**