use of org.xwiki.crypto.password.KeyDerivationFunctionFactory in project xwiki-commons by xwiki.
the class DefaultKeyDerivationFunctionFactory method getInstance.
@Override
public KeyDerivationFunction getInstance(byte[] encoded) {
KeyDerivationFunc func = KeyDerivationFunc.getInstance(ASN1Sequence.getInstance(encoded));
KeyDerivationFunctionFactory factory = getFactory(func.getAlgorithm().getId());
KeyDerivationFunction kdf = getBcInstance(factory, func);
if (kdf == null) {
kdf = factory.getInstance(encoded);
}
return kdf;
}
Aggregations