Changes

Jump to navigation Jump to search
check procedure
Line 17: Line 17:     
''R.E.Searcher@socsci.ru.nl''
 
''R.E.Searcher@socsci.ru.nl''
 +
 +
If a participant later comes to you with a PPN and a PIC, you go and lookup your ES. Based on your ES and the PPN given to you by the participant, you recalculate the PIC. If this is identical to the PIC supplied by the participant, then the participant is indeed the person identified by the given PPN in your data file.
 
=== Example ===
 
=== Example ===
 +
[[File:pic.png|frame|Calculating Participant Identification Code in LibreOffice]]
 +
==== Online ====
 
Try this [https://www.socsci.ru.nl/wilberth/computer/pic.html calculator] to make these checksums yourself.
 
Try this [https://www.socsci.ru.nl/wilberth/computer/pic.html calculator] to make these checksums yourself.
   −
If you install the [https://extensions.openoffice.org/en/project/cryptographic-hash-functions-uno-component-openofficeorg cryptographic hash] extension to Open Office/ Libre Office you can use [https://www.socsci.ru.nl/wilberth/nocms/computer/pic.ods this document] to calculate PIC. You may have to enable macros for it to work.
+
==== OpenOffice / LibreOffice ====
[[File:PIC libre office.png|frame|Calculating Participant Identification Code in Libre Office]]
+
If you install the [https://extensions.openoffice.org/en/project/cryptographic-hash-functions-uno-component-openofficeorg cryptographic hash] extension to OpenOffice/ LibreOffice you can use [https://www.socsci.ru.nl/wilberth/nocms/computer/pic.ods this document] to calculate PIC. You may have to enable macros for it to work.
 +
 
 +
==== Google Sheets ====
 +
You can also calculate the PICs with this [https://docs.google.com/spreadsheets/d/18jmxpui2rr3dShySQiyn06kX36cCHHGRgan2MGGXjlo/edit?usp=sharing Google Sheet]. Use ''File'' -> ''Make a copy'' if you want to alter the document.
 +
 
 +
==== Python 3 ====
 +
In Python 3 you can easily calculate pic. Note that ''secret'' and the ''ppn'' must be strings.
 +
 
 +
  #!/usr/bin/env python3
 +
  import hashlib
 +
  secret = "mySecret123!"
 +
  ppn = "0"
 +
  pic = hashlib.sha256(secret.encode('utf-8')+ppn.encode('utf-8')).hexdigest()[0:4].upper()
 +
  print(pic)
    
== Rationale ==
 
== Rationale ==

Navigation menu