Mahatma, this friendliness would be somewhat strange given the advice which Hitler had tendered to the British government concerning the suppression of India's freedom movement. During a meeting with Lord Halifax in 1938, Hitler had pledged his support to the preservation of the British empire and offered his formula for dealing with the Indian National Congress: kill Gandhi, if that isn't enough then kill the other leaders too, if that isn't enough then two hundred more activists, and so on until the Indian people will give up the hope of independence. Gandhi may of course have been unaware of Hitler's advice, but it would also be characteristically Gandhian to remain friendly towards his own would-be killer.
Some people will be shocked that Gandhi called the ultimate monster a "friend". But the correct view of sinners, view which I imbibed as the "Christian" view but which I believe has universal validity, is that they are all but instances of the general human trait of sinfulness. Hitler's fanaticism, cruelty, coldness of heart and other reprehensible traits may have differed in intensity but not in essence with those very same traits in other human beings. As human beings gifted with reason and conscience, sinners are also not beyond redemption: your fiercest persecutor today may repent and seek your friendship tomorrow. If Gandhi could approach heartless fanatics like Mohammed Ali Jinnah in a spirit of friendship, there is no reason why he should have withheld his offer of friendship from Hitler.