mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
ROT13 tweaks
This commit is contained in:
parent
46afbf9888
commit
02cf394bcd
1 changed files with 3 additions and 3 deletions
|
@ -36,9 +36,9 @@ class ROT13 extends Operation {
|
||||||
value: true
|
value: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Rotate Numbers",
|
name: "Rotate numbers",
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
value: true
|
value: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Amount",
|
name: "Amount",
|
||||||
|
@ -74,7 +74,7 @@ class ROT13 extends Operation {
|
||||||
} else if (rot13Lowercase && chr >= 97 && chr <= 122) { // Lower case
|
} else if (rot13Lowercase && chr >= 97 && chr <= 122) { // Lower case
|
||||||
chr = (chr - 97 + amount) % 26;
|
chr = (chr - 97 + amount) % 26;
|
||||||
output[i] = chr + 97;
|
output[i] = chr + 97;
|
||||||
} else if (rotNumbers && chr >= 48 && chr <= 57) {
|
} else if (rotNumbers && chr >= 48 && chr <= 57) { // Numbers
|
||||||
chr = (chr - 48 + amount) % 10;
|
chr = (chr - 48 + amount) % 10;
|
||||||
output[i] = chr + 48;
|
output[i] = chr + 48;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue