127 """ |
127 """ |
128 try: |
128 try: |
129 digestname, iterations, salt = hashParameters.split(Delimiter) |
129 digestname, iterations, salt = hashParameters.split(Delimiter) |
130 except ValueError: |
130 except ValueError: |
131 raise ValueError( |
131 raise ValueError( |
132 "Expected hash parameters string in format "\ |
132 "Expected hash parameters string in format " |
133 "'digestmod{0}iterations{0}salt".format(Delimiter)) |
133 "'digestmod{0}iterations{0}salt".format(Delimiter)) |
134 |
134 |
135 if digestname not in Hashes.keys(): |
135 if digestname not in Hashes.keys(): |
136 raise ValueError( |
136 raise ValueError( |
137 "Unsupported hash algorithm '{0}' for hash parameters '{1}'." |
137 "Unsupported hash algorithm '{0}' for hash parameters '{1}'." |