Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/One-time-pad/J/one-time-pad-1.j
Normal file
5
Task/One-time-pad/J/one-time-pad-1.j
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
require'convert/misc/vig convert/misc/ascii85'
|
||||
randseq=: {{ 2!:0'dd 2>/dev/null if=/dev/urandom count=1 bs=',":y }}
|
||||
genpad=: {{ EMPTY [ (randseq y) fwrite x }}
|
||||
encrypt=: {{ toascii85 (fread x) 0 vig a. y }}
|
||||
decrypt=: {{ (fread x) 1 vig a. fromascii85 y }}
|
||||
6
Task/One-time-pad/J/one-time-pad-2.j
Normal file
6
Task/One-time-pad/J/one-time-pad-2.j
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
'example' genpad 1000
|
||||
'example' encrypt 'this is a test'
|
||||
hc>*>I2nEB,6b#MdE;~>
|
||||
|
||||
'example' decrypt 'hc>*>I2nEB,6b#MdE;~>'
|
||||
this is a test
|
||||
Loading…
Add table
Add a link
Reference in a new issue