Example usage for org.bouncycastle.crypto.params KDFParameters getSharedSecret

List of usage examples for org.bouncycastle.crypto.params KDFParameters getSharedSecret

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.params KDFParameters getSharedSecret.

Prototype

public byte[] getSharedSecret() 

Source Link

Usage

From source file:org.ethereum.ConcatKDFBytesGenerator.java

License:Open Source License

public void init(DerivationParameters param) {
    if (param instanceof KDFParameters) {
        KDFParameters p = (KDFParameters) param;

        shared = p.getSharedSecret();
        iv = p.getIV();//  w w w . j  a  v  a  2 s .  com
    } else if (param instanceof ISO18033KDFParameters) {
        ISO18033KDFParameters p = (ISO18033KDFParameters) param;

        shared = p.getSeed();
        iv = null;
    } else {
        throw new IllegalArgumentException("KDF parameters required for KDF2Generator");
    }
}