Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
4
Task/Caesar-cipher/Groovy/caesar-cipher-3.groovy
Normal file
4
Task/Caesar-cipher/Groovy/caesar-cipher-3.groovy
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
def caesarEncode(k, text) {
|
||||
(text as int[]).collect { it==' ' ? ' ' : (((it & 0x1f) + k - 1) % 26 + 1 | it & 0xe0) as char }.join()
|
||||
}
|
||||
def caesarDecode(k, text) { caesarEncode(26 - k, text) }
|
||||
Loading…
Add table
Add a link
Reference in a new issue