Removing hundreds of duplicate images
You do not need hashlib to generate unique hashes of the pixels the hash function is enough for this.
After hashing the images it is only a matter of grouping the images by hash.
import bpy
from pprint import pprint

def duplicates(images):
    hashes = [(hash(i.pixels[:]), i.name) for i in images]
    grouped = {}

    for h, n in hashes:
        grouped.setdefault(h, []).append(n)
    
    return grouped

pprint(duplicates(bpy.data.images))


The output will look something like this:
{
 -6513983583712379323: ['Image1', 'Image2'],
 -2557438906662028752: ['Image3', 'Image4'],
 5740354900026072187: ['Render Result'],
 -3721407912412733414: ['Viewer Node'],
}


Note: The hash() function can only create meaningful hashes from immutable data structures. As @batFINGER pointed out in the comments image.pixels[:] is alreay a tuple (immutable) so we are good in this case. If however you want to create a hash from a list you have to convert it to a tuple first. E.g. hash(tuple([1,2,3]))