com.unbound.kmip.response.EncryptResponse 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.response;
import com.unbound.common.Log;
import com.unbound.kmip.KMIP;
import com.unbound.kmip.KMIPConvertException;
import com.unbound.kmip.KMIPConverter;
/**
* Created by saar.peer on 24-Jul-16.
*/
public class EncryptResponse extends ResponseItem
{
public String uid = null;
public byte[] data = null;
public byte[] corr = null;
public byte[] iv = null;
public byte[] authEncTag = null;
public EncryptResponse()
{
super(KMIP.Operation.Encrypt);
}
@Override
public void convert(KMIPConverter converter) throws KMIPConvertException
{
uid = converter.convert(KMIP.Tag.UniqueIdentifier, uid);
data = converter.convertOptional(KMIP.Tag.Data, data);
iv = converter.convertOptional(KMIP.Tag.IVCounterNonce, iv);
corr = converter.convertOptional(KMIP.Tag.CorrelationValue, corr);
authEncTag = converter.convertOptional(KMIP.Tag.AuthenticatedEncryptionTag, authEncTag);
}
public void log()
{
Log.print("EncryptResponse").log("uid", uid).
logLen("dataLen", data).
logLen("ivLen", iv).
logLen("authEncTagLen", authEncTag).
end();
}
}