us_ascii
Shifts the charcodes by 128 to create malformed US-ASCII
Created by: hackvertor
Installed 1 times
Category: Charsets
Created on: Thursday, October 31, 2024 at 11:36:26 AM
Updated on: Wednesday, November 20, 2024 at 5:32:25 PM
Tag arguments
[]
Code
class us_ascii {
encode(input) {
return input
.split("")
.map((chr) => String.fromCodePoint(chr.codePointAt() + 128))
.join("");
}
decode(input) {
return input
.split("")
.map((chr) => String.fromCodePoint(chr.codePointAt() - 128))
.join("");
}
}