/// <summary> /// 获取 HMAC SHA256 密钥。 /// </summary> /// <param name="keyGenerator">给定的 <see cref="IKeyGenerator"/>。</param> /// <param name="token">给定的 <see cref="SecurityToken"/>(可选;默认使用选项配置)。</param> /// <returns>返回字节数组。</returns> public static byte[] GetHmacSha256Key(this IKeyGenerator keyGenerator, SecurityToken token = null) => keyGenerator.GetKey512(token);