in reply to best way to encrypt long file names?

I don't know if it's the "best" way by any standards but Digest::MD5 will provide a longer output. "md5_hex" ensures no '/' character.
use Digest::MD5 qw(md5_hex); my $digest = md5_hex($data);