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

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

Introduction

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

Prototype

public byte[] getEncodingV() 

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   w  ww. j  a v  a  2s.  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);
}