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

com.unbound.client.DeriveOper 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.client;

import com.unbound.provider.KeyParameters;

import java.security.spec.ECPoint;

public abstract class DeriveOper extends CryptoOper
{
  public ECPoint ecdhPubKey = null;
  public DeriveMode mode = null;
  public int prfPurpose = 0;
  public byte[] prfTweak = null;
  public int resultLen = 0;

  protected abstract byte[] hwDerive();
  protected abstract SecretKeyObject hwDeriveKey(ObjectType objectType, String name, KeyParameters kp);

  public byte[] derive()
  {
    checkSession();
    try { return hwDerive(); }
    finally { releaseSession(); }
  }

  public SecretKeyObject deriveKey(ObjectType objectType, String name, KeyParameters kp)
  {
    checkSession();
    try { return hwDeriveKey(objectType, name, kp); }
    finally { releaseSession(); }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy