public String sign(PrivateKey privateKey, String msg) {
        try {
            Signature sign = Signature.getInstance(this.signatureAlgorithm);
            sign.initSign(privateKey);
            sign.update(msg.getBytes(StandardCharsets.UTF_8));

            return Base64.getEncoder().encodeToString(sign.sign());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
Signs {@code msg} using the given {@link PrivateKey}.

@param privateKey the private key to sign with
@param msg the message
@return a base64 string containing the signature
common/src/main/java/me/lucko/luckperms/common/webeditor/socket/SignatureAlgorithm.java