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

com.unbound.provider.UBRSAPrivateKey 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;

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"); }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy