Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,10 +1,10 @@
|
|||
Letters: append `A`..`Z` `a`..`z`
|
||||
Letters: (@'A'..'Z') ++ (@'a'..'z')
|
||||
encrypt: function [msg, key][
|
||||
pos: 0
|
||||
result: new ""
|
||||
result: ""
|
||||
loop msg 'c ->
|
||||
if in? c Letters [
|
||||
'result ++ to :char (((to :integer key\[pos]) + to :integer upper c) % 26) + to :integer `A`
|
||||
'result ++ to :char (((to :integer key\[pos]) + to :integer upper c) % 26) + to :integer 'A'
|
||||
pos: (pos + 1) % size key
|
||||
]
|
||||
return result
|
||||
|
|
@ -12,9 +12,9 @@ encrypt: function [msg, key][
|
|||
|
||||
decrypt: function [msg, key][
|
||||
pos: 0
|
||||
result: new ""
|
||||
result: ""
|
||||
loop msg 'c [
|
||||
'result ++ to :char ((26 + (to :integer c) - to :integer key\[pos]) % 26) + to :integer `A`
|
||||
'result ++ to :char ((26 + (to :integer c) - to :integer key\[pos]) % 26) + to :integer 'A'
|
||||
pos: (pos + 1) % size key
|
||||
]
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue