use of com.github.zhenwei.core.crypto.params.ISO18033KDFParameters in project LinLong-Java by zhenwei1108.
the class BaseKDFBytesGenerator method init.
public void init(DerivationParameters param) {
if (param instanceof KDFParameters) {
KDFParameters p = (KDFParameters) param;
shared = p.getSharedSecret();
iv = p.getIV();
} else if (param instanceof ISO18033KDFParameters) {
ISO18033KDFParameters p = (ISO18033KDFParameters) param;
shared = p.getSeed();
iv = null;
} else {
throw new IllegalArgumentException("KDF parameters required for generator");
}
}
Aggregations