Answers.Body: <p>The checksum is not stored in the database, have a look at <code>CRM_Contact_BAO_Contact_Utils</code> more specifically at the methods <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L158">generateChecksum</a> and <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L222">validChecksum</a>.</p>
  
  <p>The <code>genereateChecksum</code> method returns the checksum like <code>$checksum_$timestamt_$life</code> the life is in hours, so for a given checksum you could tell when was generated and what was is expire date.</p>
  
  <p>The <code>validChecksum</code> method takes the <code>$contact_id</code> and a <code>$checksum</code>  And validates it. This method is called when a profile/contribution/event/etc page is rendered and is taken from the requested URL.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-31T19:30:57.253Z
Answers.Text: Andrei - thank you very much. do you know does this mean if there is a way that i can investigate whether a specific checksum that was sent out had a 7 day or a 90 day life
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-31T19:36:06.797Z
Answers.Text: If you know the actual checksum yes, the last bit (after the second `_` underscore) is the lifetime of that checksum in hours, ie `cs=a135dc716e4e859155cf1123c11bcc27_1464650985_168` 168 / 24 hours = 7 days
Answers.UserDisplayName: Andrei
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-31T10:24:49.313Z
Answers.LastActivityDate: 2016-05-31T10:24:49.313Z
Answers.UserDisplayName: Andrei
Body: <p>I need to check on some checksums to confirm if the duration matched the setting (which we had set at 90 days but mysteriously was showing as '7' again when i went to check the Misc. settings. Can anyone tell me which table the data is in?</p>
  
  <p>Should this find it for me - if so I guess the field has an unrelated name</p>
  
  <pre><code>SELECT DISTINCT TABLE_NAME 
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE COLUMN_NAME LIKE '%checksum%'
      AND TABLE_SCHEMA='&lt;my-database&gt;';
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-31T01:24:00.960Z
Comments.Text: I don't think the checksum is stored in DB, have a look at `CRM_Contact_BAO_Contact_Utils` class more specifically to the `generateChecksum` and `validChecksum` methods https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L158
Comments.UserDisplayName: Andrei
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-31T03:41:11.297Z
Comments.Text: @Andrei you are correct - can you post that as an answer?
Comments.UserDisplayName: Coleman
Tags: <checksum>
Title: How can i investigate what duration a specific checksum had when it was sent out
ThreadText: # How can i investigate what duration a specific checksum had when it was sent out
  
  (Asked by: username_0 on 2016-05-30)
  
  I need to check on some checksums to confirm if the duration matched the setting (which we had set at 90 days but mysteriously was showing as '7' again when i went to check the Misc. settings. Can anyone tell me which table the data is in?
  
  Should this find it for me - if so I guess the field has an unrelated name
  
  ```
  SELECT DISTINCT TABLE_NAME 
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE COLUMN_NAME LIKE '%checksum%'
      AND TABLE_SCHEMA='<my-database>';
  
  ```
  
  **Tags:** checksum
  
  > **Comments:**
  > **username_1**: I don't think the checksum is stored in DB, have a look at `CRM_Contact_BAO_Contact_Utils` class more specifically to the `generateChecksum` and `validChecksum` methods https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L158  
  > **username_2**: @username_1 you are correct - can you post that as an answer?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-05-31. Score: 4
  
  The checksum is not stored in the database, have a look at `CRM_Contact_BAO_Contact_Utils` more specifically at the methods [generateChecksum](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L158) and [validChecksum](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Contact/Utils.php#L222).
  
  The `genereateChecksum` method returns the checksum like `$checksum_$timestamt_$life` the life is in hours, so for a given checksum you could tell when was generated and what was is expire date.
  
  The `validChecksum` method takes the `$contact_id` and a `$checksum` And validates it. This method is called when a profile/contribution/event/etc page is rendered and is taken from the requested URL.
  
  > **Comments:**
  > **username_0**: username_1 - thank you very much. do you know does this mean if there is a way that i can investigate whether a specific checksum that was sent out had a 7 day or a 90 day life  
  > **username_1**: If you know the actual checksum yes, the last bit (after the second `_` underscore) is the lifetime of that checksum in hours, ie `cs=a135dc716e4e859155cf1123c11bcc27_1464650985_168` 168 / 24 hours = 7 days  
  
  ---
  
  