Is there a way to get a unique hash for an asset?

I have an editor script that generates new assets (scripts) that need to be coupled with their source files in some way in case the source file is moved or renamed in the project. Is there any way to get a unique hash for an asset so I can maintain this coupling, or is there a different way to approach this problem? Thanks!

Hey Adam,

AssetDatabase.AssetPathToGUID lets you do this.

Actually, it's not a hash, but its an identifier. If the asset (lets say a texture) gets updated by photoshop, it keeps this identifier. (while a hash would change)