message: use const for ranges; use char syntax.
diff: use alloc::{borrow::Cow, string::String, vec::Vec};
  use base16;
  use core::{convert::TryFrom, fmt, marker::PhantomData};
  +use std::ops::RangeInclusive;
  use blake2::{Blake2b, Digest};
  use serde::{
  @@ -82,18 +83,18 @@ pub fn encode_iter(input: &(impl AsRef<[u8]> + ?Sized)) -> impl Iterator<Item =
  /// Returns true if all chars in a string are uppercase or lowercase.
  /// Returns false if the string is mixed case or if there are no alphabetic chars.
  fn string_is_same_case<T: AsRef<[u8]> + ?Sized>(s: &T) -> bool {
  - let lower_range = 97..=102u8; // a..=f
  - let upper_range = 65..=70u8; // A..=F
  + const LOWER_RANGE: RangeInclusive<u8> = 'a' as u8..='f' as u8;
  + const UPPER_RANGE: RangeInclusive<u8> = 'A' as u8..='F' as u8;
  let mut chars = s
  .as_ref()
  .iter()
  - .filter(|c| lower_range.contains(c) || upper_range.contains(c));
  + .filter(|c| LOWER_RANGE.contains(c) || UPPER_RANGE.contains(c));
  match chars.next() {
  Some(first) => {
  - let is_upper = upper_range.contains(first);
  - chars.all(|c| upper_range.contains(c) == is_upper)
  + let is_upper = UPPER_RANGE.contains(first);
  + chars.all(|c| UPPER_RANGE.contains(c) == is_upper)
  }
  None => {
  // String has no actual characters.
  