hi, like what bohiruci said, the buddha never wrote anything on
sanskrit. All our buddhist scriptures are derived only after the
first buddhist council that happened shortly after buddha's
parinirvana and his passing away. The teachings were recited mostly
by ananda, Buddha's attendant, in the witness of five hundred
enlightened monks.
Next, it is true that reciting may provide you with some sort of
protections from the negativities. If you cannot chant sutras, the
habit of chanting the names of buddhas and bodhisattvas will be
good enough. My understanding is that ghosts can appear more easily
to someone without mental brightness. Through chanting, for example
the names of buddhas and bodhisattva, such as na mo di zhang wang
pu sa.. our minds will have more brightness and be less vulnerable
to those negativities.
Perhaps others can add on, on this...