Yesterday in doing Arthur's Online riddle have such a topic:
If QWERTY = ABCDEF Then, OLSQFR =?
Qwerty is the Latin alphabet-based typewriter and computer keyboard used by countries. A QWERTY is the first six letters in the top line of a keyboard. The order in which the keys are arranged is designed by Christopher Cornes (Christopher sholes). A QWERTY typewriter was put into mass production in 1874. Since then it has become the most widely used human-computer interface, with most computers using a Qwerty keyboard.
If the QWERTY corresponds to ABCDEF, then the correspondence of the other letters is arranged in the order of the keyboard and alphabetically.
QWERTYUIOPASDFGHJKLZXCVBNM <=> ABCDEFGHIJKLMNOPQRSTUVWXYZ
One to find too much trouble, and then wrote a QWERTY-decrypted VBS script:
Copy Code code as follows:
' Author:demon
' website:http://demon.tw
' DATE:2012/2/9
Function Fromqwerty (str)
Dim D, S, T, I, C, R
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
t = "QWERTYUIOPASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNM"
Set d = CreateObject ("Scripting.Dictionary")
For i = 1 to 52
D (Mid (t, I, 1)) = Mid (S, I, 1)
Next
For i = 1 to Len (str)
c = Mid (str, I, 1)
If d.exists (c) Then
R = R & D (c)
Else
R = R & C
End If
Next
Fromqwerty = R
End Function
WScript.Echo Fromqwerty ("Olsqfr")
By the way also wrote a QWERTY cipher:
Copy Code code as follows:
' Author:demon
' website:http://demon.tw
' DATE:2012/2/9
Function Toqwerty (str)
Dim D, S, T, I, C, R
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
t = "QWERTYUIOPASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNM"
Set d = CreateObject ("Scripting.Dictionary")
For i = 1 to 52
D (Mid (S, I, 1)) = Mid (T, I, 1)
Next
For i = 1 to Len (str)
c = Mid (str, I, 1)
If d.exists (c) Then
R = R & D (c)
Else
R = R & C
End If
Next
Toqwerty = R
End Function
WScript.Echo Toqwerty ("I Love You")
If QWERTY = ABCDEF Then, O sgct ngx = I Love You
Source: http://demon.tw/programming/qwerty-abcdef.html