private AccountKey GetTestKey(KeyAlgorithm algo) { var key = algo == KeyAlgorithm.ES256 ? Keys.ES256Key : algo == KeyAlgorithm.ES384 ? Keys.ES384Key : algo == KeyAlgorithm.ES512 ? Keys.ES512Key : Keys.RS256Key; using (var buffer = new MemoryStream(Encoding.UTF8.GetBytes(key))) { return(new AccountKey(KeyInfo.From(buffer))); } }