List of usage examples for org.bouncycastle.crypto.params IESWithCipherParameters getCipherKeySize
public int getCipherKeySize()
From source file:dorkbox.util.crypto.CryptoECC.java
License:Apache License
public static boolean compare(IESWithCipherParameters cipherAParams, IESWithCipherParameters cipherBParams) { if (cipherAParams.getCipherKeySize() != cipherBParams.getCipherKeySize()) { return false; }/*from w w w .j a v a 2 s . c om*/ // only need to cast one side. return compare((IESParameters) cipherAParams, cipherBParams); }
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. java2 s . c o m /////////// 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); }