There was a question about Arthur's Online Riddle yesterday:
If QWERTY = ABCDEF then, OLSQFR =?
Qwerty is a standard typewriter and computer keyboard based on Latin letters used by countries. QWERTY is the first six letters in the first line of the keyboard. The key arrangement sequence was designed by Christopher Sholes. Typewriters arranged by QWERTY were put into mass production in 1874. Since then, it has become the most widely used man-machine interface, and most computers use Qwerty keyboards.
If QWERTY corresponds to ABCDEF, the correspondence between other letters is arranged by keyboard order and alphabetic order.
QWERTYUIOPASDFGHJKLZXCVBNM <=> ABCDEFGHIJKLMNOPQRSTUVWXYZ
One query is too troublesome, so I wrote a VBS script for QWERTY decryption:Copy codeThe Code is 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, I also wrote a QWERTY encrypted:Copy codeThe Code is 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