Botan: src/pubkey/keypair/keypair.h Source File

Botan 1.10.17

keypair.h
Go to the documentation of this file.
1 /*
2 * Keypair Checks
3 * (C) 1999-2010 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_KEYPAIR_CHECKS_H__
9 #define BOTAN_KEYPAIR_CHECKS_H__
10
11 #include <botan/pk_keys.h>
12
13 namespace Botan {
14
15 namespace KeyPair {
16
17 /**
18 * Tests whether the key is consistent for encryption; whether
19 * encrypting and then decrypting gives to the original plaintext.
20 * @param rng the rng to use
21 * @param key the key to test
22 * @param padding the encryption padding method to use
23 * @return true if consistent otherwise false
24 */
25 BOTAN_DLL bool
26 encryption_consistency_check(RandomNumberGenerator& rng,
27 const Private_Key& key,
28 const std::string& padding);
29
30 /**
31 * Tests whether the key is consistent for signatures; whether a
32 * signature can be created and then verified
33 * @param rng the rng to use
34 * @param key the key to test
35 * @param padding the signature padding method to use
36 * @return true if consistent otherwise false
37 */
38 BOTAN_DLL bool
39 signature_consistency_check(RandomNumberGenerator& rng,
40 const Private_Key& key,
41 const std::string& padding);
42
43 }
44
45 }
46
47 #endif
Botan::KeyPair::signature_consistency_check
bool signature_consistency_check(RandomNumberGenerator &rng, const Private_Key &key, const std::string &padding)
Definition: keypair.cpp:47
Botan::KeyPair::encryption_consistency_check
bool encryption_consistency_check(RandomNumberGenerator &rng, const Private_Key &key, const std::string &padding)
Definition: keypair.cpp:18
Botan
Definition: algo_base.h:14