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