Search in sources :

Example 1 with ISO18033KDFParameters

use of org.gudy.bouncycastle.crypto.params.ISO18033KDFParameters in project BiglyBT by BiglySoftware.

the class BaseKDFBytesGenerator method init.

@Override
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 KDF2Generator");
    }
}
Also used : ISO18033KDFParameters(org.gudy.bouncycastle.crypto.params.ISO18033KDFParameters) KDFParameters(org.gudy.bouncycastle.crypto.params.KDFParameters) ISO18033KDFParameters(org.gudy.bouncycastle.crypto.params.ISO18033KDFParameters)

Aggregations

ISO18033KDFParameters (org.gudy.bouncycastle.crypto.params.ISO18033KDFParameters)1 KDFParameters (org.gudy.bouncycastle.crypto.params.KDFParameters)1