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

com.unbound.provider.kmip.attribute.MessageExt 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.attribute;

import com.unbound.provider.kmip.KMIP;
import com.unbound.provider.kmip.KMIPConvertException;
import com.unbound.provider.kmip.KMIPConverter;

import java.util.ArrayList;

/**
 * Created by valery.osheter on 19-Nov-15.
 */
public class MessageExt
{
  public String vendorId = "";
  public Boolean critical = false;

  public ArrayList auth = new ArrayList();
  public Integer mgf = null;
  public Integer pssSaltSize = null;
  public byte[] iv = null;
  public Integer dataLength = null;
  public Boolean encDecForWrapUnwrap = null;


  public void convert(KMIPConverter converter) throws KMIPConvertException
  {
    int begin = converter.convertBegin(KMIP.Tag.MessageExtension);
    vendorId = converter.convert(KMIP.Tag.VendorIdentification, vendorId);
    critical = converter.convert(KMIP.Tag.CriticalityIndicator, critical);
    {
      int vendorBegin = converter.convertBegin(KMIP.Tag.VendorExtension);
      if (auth != null) converter.convertBufList(KMIP.Tag.DyAuth, auth);
      mgf = converter.convertOptional(KMIP.Tag.DyMgfAlg, mgf);
      pssSaltSize = converter.convertOptional(KMIP.Tag.DyPssSaltSize, pssSaltSize);
      iv = converter.convertOptional(KMIP.Tag.IVCounterNonce, iv);
      dataLength = converter.convertOptional(KMIP.Tag.DataLength, dataLength);
      encDecForWrapUnwrap = converter.convertOptional(KMIP.Tag.DyEncDecForWrapUnWrap, encDecForWrapUnwrap);
      converter.convertEnd(vendorBegin);
    }
    converter.convertEnd(begin);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy