(str: string, key: number)
| 11 | } |
| 12 | |
| 13 | function xorEncode(str: string, key: number): string { |
| 14 | return str |
| 15 | .split('') |
| 16 | .map((char) => String.fromCharCode(char.charCodeAt(0) ^ key)) |
| 17 | .join(''); |
| 18 | } |
| 19 | |
| 20 | export function encodeFlag(flag: string): string { |
| 21 | const step1 = rot13(flag); |
no outgoing calls
no test coverage detected