internal static void Validate(this BewitOptions options) { if (string.IsNullOrWhiteSpace(options.Secret)) { throw new ArgumentException( "Value cannot be null or whitespace.", nameof(options.Secret)); } }
public HmacSha256CryptographyService(BewitOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (string.IsNullOrWhiteSpace(options.Secret)) { throw new ArgumentNullException(nameof(options.Secret)); } _secret = options.Secret; }