Tool for encryption detection

Hi all,
is there a tool that can be used to detect the type of encryption that has been used to encrypt a string or file?

Thanks,

Pilgrim23