.. java:import:: org.json JSONObject

Key
===

.. java:package:: com.idopte.scmapi
   :noindex:

.. java:type:: public abstract class Key extends TokenObject

   Abstract class describes a key object. Inherits from \ :java:ref:`TokenObject`\ .

Methods
-------
getAlgorithmName
^^^^^^^^^^^^^^^^

.. java:method:: public String getAlgorithmName()
   :outertype: Key

   Gets the algorithm of the key. The only possible value is currently ``"RSA"``.

   :return: the algorithm of the key.

getKeyType
^^^^^^^^^^

.. java:method:: public String getKeyType()
   :outertype: Key

   Gets string identifying the type of the key. The possible values are:

   ..

   * ``"publicKey"``
   * ``"privateKey"``

   :return: the key type.

getkeyLength
^^^^^^^^^^^^

.. java:method:: public int getkeyLength()
   :outertype: Key

   Gets the key length, in bits.

   :return: the key length.