docs: @VisibleForTesting
      byte[] RSAEncrypt(byte[] decryptedInput) throws IncompatibleDeviceException, CryptoException {
          try {
              Certificate certificate = getRSAKeyEntry().getCertificate();
              Cipher cipher = Cipher.getInstance(RSA_TRANSFORMATION);
              cipher.init(Cipher.ENCRYPT_MODE, certificate);
              return cipher.doFinal(decryptedInput);
          } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException e) {
              /*
               * This exceptions are safe to be ignored:
               *
               * - NoSuchPaddingException:
               *      Thrown if PKCS1Padding is not available. Was introduced in API 1.
               * - NoSuchAlgorithmException:
               *      Thrown if the transformation is null, empty or invalid, or if no security provider
               *      implements it. Was introduced in API 1.
               * - InvalidKeyException:
               *      Thrown if the given key is inappropriate for initializing this cipher.
               *
               * Read more in https://developer.android.com/reference/javax/crypto/Cipher
               */
              Log.e(TAG, "The device can't encrypt input using a RSA Key.", e);
              throw new IncompatibleDeviceException(e);
          } catch (IllegalBlockSizeException | BadPaddingException e) {
              /*
               * They really should not be thrown at all since padding is requested in the transformation.
               * Delete the AES keys since those originated the input.
               *
               * - IllegalBlockSizeException:
               *      Thrown if no padding has been requested and the length is not multiple of block size.
               * - BadPaddingException:
               *      Thrown only on decrypt mode.
               */
              deleteAESKeys();
              throw new CryptoException("The RSA decrypted input is invalid.", e);
          }
      }