How to ensure CiviCRM checksum / cid are valid in custom Drupal module
A little grepping around and I found this: 

CRM_Contact_BAO_Contact_Utils::validChecksum($cid, $_GET["cs$c"]) 

which takes a CiviCRM contact id ($cid) and compares it to the checksum in the URL and did the trick for me as follows:

  $cid = check_plain($_GET['cid']);
  if ($cid != "" &amp;&amp; CRM_Contact_BAO_Contact_Utils::validChecksum($cid, $_GET["cs$c"])) {
        //Contact ID and Checksum match up, embed a view 
        //with $cid as an argument (or other custom functionality)
  } else {
        //Not a match, decide what you want to do in this case 
        //(e.g. check if user is logged in, or display error...)
  }


UPDATE: 

It looks like the usage has changed slightly in core since I pulled the above out of there (although the above was still working for me). Try this (taken from here):

    //check if this is a checksum authentication
$userChecksum = CRM_Utils_Request::retrieve('cs', 'String', $this);
if ($userChecksum) {
  //check for anonymous user.
  $validUser = CRM_Contact_BAO_Contact_Utils::validChecksum($tempID, $userChecksum);
  if ($validUser) {
    return $tempID;
  }
}