Cipher CTF Challenge Generator (Alt-Code Cipher)Press the blue button to regenerate an Alt-Code Cipher challenge. The Alt-code cipher maps character values to the Alt-Codes: ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→. |
Coding
The Alt-code cipher maps character values to the Alt-Codes: ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→
abcdefghijklmnopqrstuvwxyz ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→
The basic coding in C# is:
public static string getAlt(string str) { str = str.ToLower(); var newcipher = ""; string mapping = "☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→"; foreach (char ch in str) { if (ch >= 'a' && ch <= 'z') newcipher = newcipher + mapping[(int)ch - (int)'a']; else newcipher = newcipher + ch; } return (newcipher);