code: private byte[] doCipher(Cipher cipher, Key key, byte[] datas) {
          log.debug("开始非对称的加解密");
          RSAKey rsaKey = (RSAKey) key;
  
          //计算block大小
          int maxBlock = rsaKey.getModulus().bitLength() / 8;
          //加密时需要减11
          if (key instanceof RSAPublicKey) {
              maxBlock = maxBlock - 11;
          }
  
          log.debug("当前block大小为：[{}]，开始加/解密", maxBlock);
  
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          try {
              for (int i = 0, offset = 0; datas.length > offset; i++, offset = maxBlock * i) {
                  if (datas.length - offset > maxBlock) {
                      out.write(cipher.doFinal(datas, offset, maxBlock));
                  } else {
                      out.write(cipher.doFinal(datas, offset, datas.length - offset));
                  }
              }
  
              byte[] result = out.toByteArray();
              IOUtils.closeQuietly(out);
              return result;
          } catch (IOException | IllegalBlockSizeException | BadPaddingException e) {
              log.warn("RSA加/解密失败", e);
              throw new SecureException(e);
          }
      }
docs: 加/解密数据
  
  @param cipher cipher
  @param key    key
  @param datas  要加/解密的数据（BASE64 encode过的数据）
  @return 加/解密结果