Package org.pgpainless.key.generation.type.rsa

# Class RSA

java.lang.Object
org.pgpainless.key.generation.type.rsa.RSA

All Implemented Interfaces:
  `KeyType`

public class RSA extends Object implements KeyType
Key type that specifies the RSA_GENERAL algorithm.

## Method Summary

Modifier and Type
Method
Description
`PublicKeyAlgorithm`
`getAlgorithm()`
Return the public key algorithm.
`AlgorithmParameterSpec`
`getAlgorithmSpec()`
Return an implementation of `AlgorithmParameterSpec` that can be used to generate the key.
`int`
`getBitStrength()`
Return the strength of the key in bits.
`String`
`getName()`
Return the encryption algorithm name.
`static RSA`
`withLength(RsaLength length)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.pgpainless.key.generation.type.KeyType

`canAuthenticate, canCertify, canEncryptCommunication, canEncryptStorage, canSign`

## Method Details

### withLength

public static RSA withLength(@Nonnull RsaLength length)

### getName

public String getName()
Description copied from interface: `KeyType`
Return the encryption algorithm name.

Specified by:
  `getName` in interface `KeyType`
Returns:
  algorithm name.

### getAlgorithm

public PublicKeyAlgorithm getAlgorithm()
Description copied from interface: `KeyType`
Return the public key algorithm.

Specified by:
  `getAlgorithm` in interface `KeyType`
Returns:
  public key algorithm

### getBitStrength

public int getBitStrength()
Description copied from interface: `KeyType`
Return the strength of the key in bits.

Specified by:
  `getBitStrength` in interface `KeyType`
Returns:
  strength of the key in bits

### getAlgorithmSpec

public AlgorithmParameterSpec getAlgorithmSpec()
Description copied from interface: `KeyType`
Return an implementation of `AlgorithmParameterSpec` that can be used to generate the key.

Specified by:
  `getAlgorithmSpec` in interface `KeyType`
Returns:
  algorithm parameter spec