Example usage for org.bouncycastle.crypto.params IESWithCipherParameters getDerivationV

List of usage examples for org.bouncycastle.crypto.params IESWithCipherParameters getDerivationV

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.params IESWithCipherParameters getDerivationV.

Prototype

public byte[] getDerivationV() 

Source Link

Usage

From source file:dorkbox.util.serialization.IesWithCipherParametersSerializer.java

License:Apache License

@Override
public void write(Kryo kryo, Output output, IESWithCipherParameters key) {
    byte[] bytes;
    int length;//from   www . j a v  a  2 s .c om

    ///////////
    bytes = key.getDerivationV();
    length = bytes.length;

    output.writeInt(length, true);
    output.writeBytes(bytes, 0, length);

    ///////////
    bytes = key.getEncodingV();
    length = bytes.length;

    output.writeInt(length, true);
    output.writeBytes(bytes, 0, length);

    ///////////
    output.writeInt(key.getMacKeySize(), true);

    ///////////
    output.writeInt(key.getCipherKeySize(), true);
}