1################################################################ 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20################################################################ 21 22"""decrypt.py: the Blowfish, AES, SHA-1 and PBKDF2 known-answer tests.""" 23import pytest 24 25from aootest.checkers import decrypt 26 27pytestmark = pytest.mark.selftest 28 29ANSWERS = decrypt.known_answers() 30 31 32@pytest.mark.parametrize("got, want", [pytest.param(g, w, id=n) for n, g, w in ANSWERS]) 33def test_known_answer(got, want): 34 assert got == want 35 36 37def test_known_answers_are_not_empty(): 38 assert len(ANSWERS) >= 9 39