com.unbound.provider.UBRSAPrivateKey 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.provider;
import com.unbound.client.RSAPrivateKeyObject;
import java.math.BigInteger;
import java.security.ProviderException;
import java.security.interfaces.RSAPrivateCrtKey;
public final class UBRSAPrivateKey implements RSAPrivateCrtKey
{
final RSAPrivateKeyObject object;
UBRSAPrivateKey(RSAPrivateKeyObject object) { this.object = object; }
public RSAPrivateKeyObject getObject() { return object; }
@Override
public String getAlgorithm() { return "RSA"; }
@Override
public BigInteger getPublicExponent() { return object.getPublicExponent(); }
@Override
public BigInteger getModulus() { return object.getModulus(); }
@Override
public BigInteger getPrimeP() { throw new ProviderException("Function not supported"); }
@Override
public BigInteger getPrimeQ() { throw new ProviderException("Function not supported"); }
@Override
public BigInteger getPrimeExponentP() { throw new ProviderException("Function not supported"); }
@Override
public BigInteger getPrimeExponentQ() { throw new ProviderException("Function not supported"); }
@Override
public BigInteger getCrtCoefficient() { throw new ProviderException("Function not supported"); }
@Override
public BigInteger getPrivateExponent() { throw new ProviderException("Function not supported"); }
@Override
public String getFormat() { return null; } // Workaround for Tomcat
@Override
public byte[] getEncoded() { throw new ProviderException("Function not supported"); }
}