com.unbound.kmip.request.dy.DyDeriveRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbound-java-provider Show documentation
Show all versions of unbound-java-provider Show documentation
This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi
package com.unbound.kmip.request.dy;
import com.unbound.common.Log;
import com.unbound.kmip.KMIP;
import com.unbound.kmip.KMIPConvertException;
import com.unbound.kmip.KMIPConverter;
import com.unbound.kmip.attribute.CryptoParams;
import com.unbound.kmip.request.RequestItem;
/**
* Created by valery.osheter on 14-Nov-16.
*/
public class DyDeriveRequest extends RequestItem
{
public String uid = null;
public CryptoParams params = null;
public Integer derivationMethod = null;
public Integer secretSize = null;
public byte[] data = null;
public DyDeriveRequest()
{
super(KMIP.Operation.DyDerive);
}
public void convert(KMIPConverter converter) throws KMIPConvertException
{
uid = converter.convert(KMIP.Tag.UniqueIdentifier, uid);
derivationMethod = converter.convertOptional(KMIP.Tag.DerivationMethod, derivationMethod);
if (!converter.isWrite() && converter.getNextTag() == KMIP.Tag.CryptographicParameters)
params = new CryptoParams();
if (params != null) params.convertValue(converter);
data = converter.convert(KMIP.Tag.Data, data);
secretSize = converter.convertOptional(KMIP.Tag.DySecretSize, secretSize);
}
public void log()
{
Log log = Log.func("DyDeriveRequest").
log("uid", uid).
logLen("dataLen", data).
log("secretSize", secretSize).
log("derivationMethod", derivationMethod).
end();
if (params!=null) params.log();
log.leave();
}
}