Fixes bug 30469

Calculate the SHA1 of the encoded $$content, to prevent Digest::SHA::sha512_base64 to croak with wide characters.
Similar to what's done for MD5  in https://github.com/bestpractical/rt/blob/80bcdcfdea2988329a49bc6823f54da5d304762c/lib/RT/User.pm#L1000