public interface KeyDerivationFunction
Modifier and Type | Method and Description |
---|---|
KeyParameter |
derive(byte[] password)
Derive a key from the provided password.
|
KeyWithIVParameters |
derive(byte[] password,
int ivSize)
Derive a key and an initialization vector of the requested size from the provided password.
|
byte[] |
getEncoded()
Serialize the definition of this key derivation function.
|
int |
getKeySize() |
KeyDerivationFunctionParameters |
getParameters() |
boolean |
isKeySizeOverwritten() |
void |
overrideKeySize(int keySize)
Override the key size receive from the factory.
|
int getKeySize()
void overrideKeySize(int keySize)
KeyDerivationFunctionParameters
) to set the effective key size that
should be produced by the derivation function. This value will not be encoded with the function, which means
that the recipient of the encoded form will also have to overwrite the key size to be able to use this function.keySize
- the length of the key to generate. A negative or null value means use the one from parameters.boolean isKeySizeOverwritten()
KeyDerivationFunctionParameters getParameters()
KeyParameter derive(byte[] password)
password
- the password already converted properly to a byte array.
See (PasswordToByteConverter
) for converting password properly.KeyWithIVParameters derive(byte[] password, int ivSize)
password
- the password already converted properly to a byte array.
See (PasswordToByteConverter
) for converting password properly.ivSize
- the initialization vector size in byte.byte[] getEncoded() throws IOException
IOException
- on errorCopyright © 2004–2022 XWiki. All rights reserved.