List of usage examples for org.bouncycastle.crypto.generators Poly1305KeyGenerator checkKey
public static void checkKey(byte[] key)
From source file:freenet.crypt.MessageAuthCode.java
License:GNU General Public License
/** * Checks to make sure the provided key is a valid Poly1305 key * @param encodedKey Key to check/* w w w.j a v a 2 s . c om*/ */ private final void checkPoly1305Key(byte[] encodedKey) { if (type != MACType.Poly1305AES) { throw new UnsupportedTypeException(type); } Poly1305KeyGenerator.checkKey(encodedKey); }