com.datecs.crypto

## Class RSA

- java.lang.Object
- - com.datecs.crypto.RSA

-     public final class RSA
      extends java.lang.Object

  Helper methods to encrypt or decrypt with RSA algorithm.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RSA()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `decrypt(byte[] modBytes, byte[] expBytes, byte[] data)` Decrypt data
    `static byte[]` | `encrypt(byte[] modBytes, byte[] expBytes, byte[] data)` Encrypt data
    `static byte[]` | `signSHA256(byte[] modBytes, byte[] expBytes, byte[] data)` Sign SHA256 with RSA.

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

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

- - ### Constructor Detail

    - #### RSA

          public RSA()

  - ### Method Detail

    - #### encrypt

          public static byte[] encrypt(byte[] modBytes,
                                       byte[] expBytes,
                                       byte[] data)

      Encrypt data
      Parameters:
        `modBytes` - key module bytes.
        `expBytes` - key exponents bytes.
        `data` - the data.
      Returns:
        decrypted data.

    - #### decrypt

          public static byte[] decrypt(byte[] modBytes,
                                       byte[] expBytes,
                                       byte[] data)

      Decrypt data
      Parameters:
        `modBytes` - key module bytes.
        `expBytes` - key exponents bytes.
        `data` - the data.
      Returns:
        decrypted data.

    - #### signSHA256

          public static byte[] signSHA256(byte[] modBytes,
                                          byte[] expBytes,
                                          byte[] data)

      Sign SHA256 with RSA.
      Parameters:
        `modBytes` - key module bytes.
        `expBytes` - key exponents bytes.
        `data` - the data.
      Returns:
        the signed data.