
io.github.mmm.crypto.key.KeyCreator Maven / Gradle / Ivy
package io.github.mmm.crypto.key;
import io.github.mmm.crypto.algorithm.CryptoAlgorithm;
/**
* Abstract interface for dealing with cryptographic keys. As symmetric and asymmetric key creation are so different
* there is no common method here. This might change in the future.
*
* @see io.github.mmm.crypto.asymmetric.key.AsymmetricKeyCreator
* @see io.github.mmm.crypto.symmetric.key.SymmetricKeyCreator
*
* @author Joerg Hohwiller (hohwille at users.sourceforge.net)
* @since 1.0.0
*/
public abstract interface KeyCreator extends CryptoAlgorithm {
/**
* @return the length of the key in bits. The bigger the key length the stronger and more secure the encryption but
* also the more computation power is required. Reasonable values depend on the {@link #getAlgorithm()
* algorithm}: A recent value for RSA is 4096 bits while for PBKDF2 256 may be sufficient.
*/
int getKeyLength();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy