code: public static boolean isProperlyFormattedKey( String hexadecimalStr ) {
          if (hexadecimalStr == null) return false;
          // Length is expected to be the same as the digest ...
          final int length = hexadecimalStr.length();
          if (length != ALGORITHM.getHexadecimalStringLength()) return false;
          // The characters all must be hexadecimal digits ...
          return StringUtil.isHexString(hexadecimalStr);
      }
docs: Determine if the supplied hexadecimal string is potentially a binary key by checking the format of the string.
  
  @param hexadecimalStr the hexadecimal string; may be null
  @return true if the supplied string is a properly formatted hexadecimal representation of a binary key, or false otherwise