Python hash utilities