Working with sensitive data: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(improved code)
Line 11: Line 11:
<rcode name='obj_encode_test'  
<rcode name='obj_encode_test'  
variables="
variables="
name:table|description:Tähän voit pastettaa taulun|type:table|
name:table|description:Paste your table here|type:table|
name:key|type:password|description:Salausavain (16,32 tai 64 ascii-merkkiä)
name:password|type:password|description:Password (16,32, or 64 ascii characters)
"
"
>
>
Line 18: Line 18:
library(OpasnetUtils)
library(OpasnetUtils)


oprint(table)
cat(paste("The table has", nrow(table), "rows and", ncol(table), "columns with names...\n", sep = " "))
etable <- objects.encode(table, key)
oprint(table[1, ])
 
etable <- objects.encode(table, password)
objects.put(etable)
objects.put(etable)
cat("The table has been encrypted and saved with name etable. Please write down the key of the run and your password, otherwise you will not be able to retrieve your data.\nDO NOT REMOVE THIS RUN, JUST CLOSE THE BROWSER WINDOW. Otherwise you will permanently remove your encrypted table.\n")


</rcode>
</rcode>
Line 29: Line 33:
variables="
variables="
name:token|type:text|description:Identifier of the run|
name:token|type:text|description:Identifier of the run|
name:key|type:password|description:Encryption key (16,32, or 64 ascii characters)
name:password|type:password|description:Password (16,32, or 64 ascii characters)
"
"
>
>
Line 36: Line 40:


objects.get(token)
objects.get(token)
table <- objects.decode(etable, key)
table <- objects.decode(etable, password)
oprint(table)
oprint(table)
</rcode>
</rcode>

Revision as of 15:19, 15 March 2013


Question

How to work with data that has sensitive parts?

Answer

Object encoding test

Paste your table here:

Cancel

Password (16,32, or 64 ascii characters):

+ Show code

Object decoding test

Identifier of the run:

Password (16,32, or 64 ascii characters):

+ Show code