Sorry .... not a very bright answer (brain not in gear!): this will simply
scramble a word.
To create anagrams, you need (I guess) to look at all possiblities of the
letter combinations and then use the dictionary to validate them. And
anagrams can be formed from a phrase.
So pretty complex I think.
See
http://j-walk.com/ss/jokes/anagrams.htm
for example of possiblities from the word "Spreadsheet"!