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 ====
 
==== 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.
Line 23: Line 26:  
==== OpenOffice / LibreOffice ====
 
==== OpenOffice / LibreOffice ====
 
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.
 
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.
[[File:PIC libre office.png|frame|Calculating Participant Identification Code in LibreOffice]]
      
==== Google Sheets ====
 
==== Google Sheets ====
You can also calculate the PICs with this [https://docs.google.com/spreadsheets/d/18jmxpui2rr3dShySQiyn06kX36cCHHGRgan2MGGXjlo/edit?usp=sharing Google Sheet].
+
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 ====
 
==== Python 3 ====
In Python 3 you can easily calculate pic. Note that the secret and the ppn must be strings.
+
In Python 3 you can easily calculate pic. Note that ''secret'' and the ''ppn'' must be strings.
   −
#!/usr/bin/env/python3
+
  #!/usr/bin/env python3
secret = "mySecret123!"
+
  import hashlib
ppn = "0"
+
  secret = "mySecret123!"
pic = hashlib.sha256(secret.encode('utf-8')+ppn.encode('utf-8')).hexdigest()[0:4].upper()
+
  ppn = "0"
print(pic)
+
  pic = hashlib.sha256(secret.encode('utf-8')+ppn.encode('utf-8')).hexdigest()[0:4].upper()
 +
  print(pic)
    
== Rationale ==
 
== Rationale ==

Navigation menu