MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / copy

Method copy

tools/python-3.11.9-amd64/Lib/hmac.py:122–137  ·  view source on GitHub ↗

Return a separate copy of this hashing object. An update to this copy won't affect the original object.

(self)

Source from the content-addressed store, hash-verified

120 inst.update(msg)
121
122 def copy(self):
123 """Return a separate copy of this hashing object.
124
125 An update to this copy won't affect the original object.
126 """
127 # Call __new__ directly to avoid the expensive __init__.
128 other = self.__class__.__new__(self.__class__)
129 other.digest_size = self.digest_size
130 if self._hmac:
131 other._hmac = self._hmac.copy()
132 other._inner = other._outer = None
133 else:
134 other._hmac = None
135 other._inner = self._inner.copy()
136 other._outer = self._outer.copy()
137 return other
138
139 def _current(self):
140 """Return a hash object for the current state.

Callers 15

translationFunction · 0.45
prfFunction · 0.45
_synthesizeFunction · 0.45
getmoduleFunction · 0.45
_signature_fromstrFunction · 0.45
_get_revised_pathFunction · 0.45
__init__Method · 0.45
findMethod · 0.45
testfileFunction · 0.45
setUpMethod · 0.45
DocFileTestFunction · 0.45

Calls 1

__new__Method · 0.45

Tested by 7

__init__Method · 0.36
findMethod · 0.36
testfileFunction · 0.36
setUpMethod · 0.36
DocFileTestFunction · 0.36
debug_scriptFunction · 0.36
mainFunction · 0.36