Deserialize an algorithm from its string equivalent.
Deserialize an algorithm from its string equivalent. Only real algorithms supported, if you need to support "none", use "optionFromString".
the name of the algorithm (e.g. HS256 or HmacSHA256)
the actual instance of the algorithm
JwtNonSupportedAlgorithm
in case the string doesn't match any known algorithm
Deserialize an algorithm from its string equivalent.
Deserialize an algorithm from its string equivalent. If it's the special "none" algorithm, return None, else, return Some with the corresponding algorithm inside.
the name of the algorithm (e.g. none, HS256 or HmacSHA256)
the actual instance of the algorithm
JwtNonSupportedAlgorithm
in case the string doesn't match any known algorithm nor "none"