1
0
mirror of synced 2024-12-13 07:21:06 +01:00

Add magic checks for base85

This commit is contained in:
Benedikt Werner 2020-05-16 00:42:50 +02:00
parent 103ecff6a7
commit 15dd9d4c93
No known key found for this signature in database
GPG Key ID: 1DBFF0F8E9E121EB

View File

@ -33,6 +33,23 @@ class FromBase85 extends Operation {
value: ALPHABET_OPTIONS
},
];
this.checks = [
{
pattern: "^\\s*(?:<~)?(?:(?:\\s*[!-u]){5}|\\s*z)+[!-u\\s]*(?:~>)?\\s*$",
flags: "i",
args: ["!-u"]
},
{
pattern: "^(?:\\s*[0-9a-zA-Z.\\-:+=^!/*?&<>()[\\]{}@%$#])+\\s*$",
flags: "i",
args: ["0-9a-zA-Z.\\-:+=^!/*?&<>()[]{}@%$#"]
},
{
pattern: "^(?:\\s*[0-9A-Za-z!#$%&()*+\\-;<=>?@^_`{|}~])+\\s*$",
flags: "i",
args: ["0-9A-Za-z!#$%&()*+\\-;<=>?@^_`{|}~"]
},
];
}
/**