/
usr
/
lib
/
python2.6
/
site-packages
/
oslo_utils
/
/usr/lib/python2.6/site-packages/oslo_utils
mkdir
upload
Name
Size
Mode
Actions
locale/
-
0755
rm
tests/
-
0755
rm
encodeutils.py
6309
0644
edit
dl
rm
encodeutils.pyc
3462
0644
edit
dl
rm
eventletutils.py
5266
0644
edit
dl
rm
eventletutils.pyc
3230
0644
edit
dl
rm
excutils.py
9407
0644
edit
dl
rm
excutils.pyc
8818
0644
edit
dl
rm
fileutils.py
2838
0644
edit
dl
rm
fileutils.pyc
2985
0644
edit
dl
rm
fixture.py
1556
0644
edit
dl
rm
fixture.pyc
1732
0644
edit
dl
rm
fnmatch.py
2600
0644
edit
dl
rm
fnmatch.pyc
2100
0644
edit
dl
rm
imageutils.py
6640
0644
edit
dl
rm
imageutils.pyc
4847
0644
edit
dl
rm
importutils.py
2359
0644
edit
dl
rm
importutils.pyc
2472
0644
edit
dl
rm
netutils.py
11478
0644
edit
dl
rm
netutils.pyc
11144
0644
edit
dl
rm
reflection.py
7015
0644
edit
dl
rm
reflection.pyc
6191
0644
edit
dl
rm
secretutils.py
1317
0644
edit
dl
rm
secretutils.pyc
998
0644
edit
dl
rm
strutils.py
9105
0644
edit
dl
rm
strutils.pyc
8068
0644
edit
dl
rm
timeutils.py
14739
0644
edit
dl
rm
timeutils.pyc
16914
0644
edit
dl
rm
units.py
922
0644
edit
dl
rm
units.pyc
593
0644
edit
dl
rm
uuidutils.py
1349
0644
edit
dl
rm
uuidutils.pyc
1265
0644
edit
dl
rm
versionutils.py
2619
0644
edit
dl
rm
versionutils.pyc
2924
0644
edit
dl
rm
_i18n.py
1158
0644
edit
dl
rm
_i18n.pyc
540
0644
edit
dl
rm
__init__.py
0
0644
edit
dl
rm
__init__.pyc
142
0644
edit
dl
rm
Edit:
/usr/lib/python2.6/site-packages/oslo_utils/secretutils.py
(1317B)
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import hmac try: constant_time_compare = hmac.compare_digest except AttributeError: def constant_time_compare(first, second): """Returns True if both string inputs are equal, otherwise False. This function should take a constant amount of time regardless of how many characters in the strings match. This function uses an approach designed to prevent timing analysis by avoiding content-based short circuiting behaviour, making it appropriate for cryptography. """ if len(first) != len(second): return False result = 0 for x, y in zip(first, second): result |= ord(x) ^ ord(y) return result == 0
Save
cmd:
run