docs: public static byte[] sign(byte[] text, PrivateKey key, String algorithm) throws SignatureException {
          Signature signature;
          try {
              signature = Signature.getInstance(algorithm);
              signature.initSign(key);
          } catch (GeneralSecurityException e) {
              throw new IllegalArgumentException("cannot initialize signature for algorithm " + algorithm, e);
          }
          signature.update(text);
          return signature.sign();
      }