code: private byte[] doEncryptionOrDecryption(byte[] crypt, Key key, int mode) {
          Cipher rsaCipher;
          try {
              rsaCipher = Cipher.getInstance(CIPHER);
          } catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
              throw SeedException.wrap(e, CryptoErrorCode.UNABLE_TO_GET_CIPHER)
                      .put("alias", alias)
                      .put("cipher", CIPHER);
          }
          try {
              rsaCipher.init(mode, key);
          } catch (InvalidKeyException e) {
              throw SeedException.wrap(e, CryptoErrorCode.INVALID_KEY)
                      .put("alias", alias);
          }
          try {
              return rsaCipher.doFinal(crypt);
          } catch (IllegalBlockSizeException | BadPaddingException e) {
              throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION);
          }
      }
docs: Encrypts or decrypts a byte[].
  
  @param crypt byte[] to encrypt or decrypt
  @param key   key to use
  @param mode  {@link Cipher#DECRYPT_MODE} to decrypt or {@link Cipher#ENCRYPT_MODE} to encrypt
  @return byte[] encrypted or decrypted