this can be done by hand. arrange the message into a square grid
and read it out vertically, column by column.
the size of the grid is determined by the length of the string.
scrambling the string "this is a test" into "t ashi tist s e ":
descrambling the string "t ashi tist s e ":