All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.unbound.provider.kmip.request.GetRequest Maven / Gradle / Ivy

Go to download

This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi

There is a newer version: 42761
Show newest version
package com.unbound.provider.kmip.request;

import com.unbound.common.Log;
import com.unbound.provider.kmip.KMIP;
import com.unbound.provider.kmip.KMIPConvertException;
import com.unbound.provider.kmip.KMIPConverter;
import com.unbound.provider.kmip.attribute.KeyWrappingSpec;

/**
 * Created by valery.osheter on 25-Nov-15.
 */
public class GetRequest extends RequestItem
{
  public String uid = null;
  public Integer formatType = null;

  public Integer compressionType = null;
  public KeyWrappingSpec keyWrap = null;

  public String password;

  public GetRequest()
  {
    super(KMIP.Operation.Get);
  }

  public void convert(KMIPConverter converter) throws KMIPConvertException
  {
    uid = converter.convertOptional(KMIP.Tag.UniqueIdentifier, uid);
    formatType = converter.convertOptional(KMIP.Tag.KeyFormatType, formatType);
    compressionType = converter.convertOptional(KMIP.Tag.KeyCompressionType, compressionType);

    if (!converter.isWrite() && converter.getNextTag() == KMIP.Tag.KeyWrappingSpecification)
    {
      keyWrap = new KeyWrappingSpec();
    }
    if (keyWrap != null) keyWrap.convert(converter);
    password = converter.convertOptional(KMIP.Tag.DyPfxPassword, password);
  }

  public void log()
  {
    Log log = Log.func("GetRequest").
      log("uid", uid).
      log("formatType", formatType).
      log("compressionType", compressionType).
    end();
    if (keyWrap!=null) keyWrap.log();
    log.leave();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy