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

org.cryptacular.adapter.AbstractWrappedRSAKey Maven / Gradle / Ivy

There is a newer version: 6.2.20
Show newest version
/* See LICENSE for licensing and NOTICE for copyright. */
package org.cryptacular.adapter;

import java.math.BigInteger;
import org.bouncycastle.crypto.params.RSAKeyParameters;

/**
 * Base class for RSA wrapped keys.
 *
 * @param    RSA key parameters type handled by this class.
 *
 * @author  Middleware Services
 */
public abstract class AbstractWrappedRSAKey extends AbstractWrappedKey
{

  /** RSA algorithm name. */
  private static final String ALGORITHM = "RSA";


  /**
   * Creates a new instance that wraps the given key.
   *
   * @param  wrappedKey  Key to wrap.
   */
  public AbstractWrappedRSAKey(final T wrappedKey)
  {
    super(wrappedKey);
  }


  /** @return  Gets the RSA modulus. */
  public BigInteger getModulus()
  {
    return delegate.getModulus();
  }


  @Override
  public String getAlgorithm()
  {
    return ALGORITHM;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy