removed weakref usage from hmac and hashlib