From f312a5c1c9ae436fa61debfdd8eb6ba6388fea1f Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 10 Aug 2013 15:23:38 -0400 Subject: Made the load NIST vectors test utility use bytes correctly --- tests/utils.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/utils.py') diff --git a/tests/utils.py b/tests/utils.py index 9fe35311..9362464e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,16 @@ +# 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 os.path @@ -35,7 +48,7 @@ def load_nist_vectors(vector_data, op, fields): # We want to test only for a particular operation return [ - tuple(vector[1][f] for f in fields) + tuple(vector[1][f].encode("ascii") for f in fields) for vector in sorted(data[op].items(), key=lambda v: v[0]) ] -- cgit v1.2.3