the secret used to sign the data
the data that is to be signed
the algorithm to be used to sign the data
signature of the data
string secret = "supersecret"; string data = "an unstoppable force crashes into an unmovable body"; string signature = sign(secret, data, JWTAlgorithm.HS512); assert(signature.length > 0); signature = sign(secret, data, JWTAlgorithm.NONE); assert(signature.length == 0);
signs the given data with the secret using the given algorithm