(flag: string)
| 18 | } |
| 19 | |
| 20 | export function encodeFlag(flag: string): string { |
| 21 | const step1 = rot13(flag); |
| 22 | const step2 = xorEncode(step1, 42); |
| 23 | const step3 = Buffer.from(step2).toString('base64'); |
| 24 | |
| 25 | return step3; |
| 26 | } |
| 27 | |
| 28 | export function decodeFlag(encoded: string): string { |
| 29 | const step1 = Buffer.from(encoded, 'base64').toString('utf-8'); |
no test coverage detected