|
Botan
1.11.15
|
#include <emsa_pkcs1.h>
Public Types | |
| typedef SCAN_Name | Spec |
Public Member Functions | |
| secure_vector< byte > | encoding_of (const secure_vector< byte > &, size_t, RandomNumberGenerator &rng) |
| secure_vector< byte > | raw_data () |
| void | update (const byte[], size_t) |
| bool | verify (const secure_vector< byte > &, const secure_vector< byte > &, size_t) |
EMSA_PKCS1v15_Raw which is EMSA_PKCS1v15 without a hash or digest id (which according to QCA docs is "identical to PKCS#11's CKM_RSA_PKCS mechanism", something I have not confirmed)
Definition at line 48 of file emsa_pkcs1.h.
typedef SCAN_Name Botan::EMSA::Spec [inherited] |
| secure_vector< byte > Botan::EMSA_PKCS1v15_Raw::encoding_of | ( | const secure_vector< byte > & | msg, |
| size_t | output_bits, | ||
| RandomNumberGenerator & | rng | ||
| ) | [virtual] |
Return the encoding of a message
| msg | the result of raw_data() |
| output_bits | the desired output bit size |
| rng | a random number generator |
Implements Botan::EMSA.
Definition at line 109 of file emsa_pkcs1.cpp.
{
return emsa3_encoding(msg, output_bits, nullptr, 0);
}
| secure_vector< byte > Botan::EMSA_PKCS1v15_Raw::raw_data | ( | ) | [virtual] |
Implements Botan::EMSA.
Definition at line 101 of file emsa_pkcs1.cpp.
{
secure_vector<byte> ret;
std::swap(ret, message);
return ret;
}
| void Botan::EMSA_PKCS1v15_Raw::update | ( | const byte | input[], |
| size_t | length | ||
| ) | [virtual] |
Add more data to the signature computation
| input | some data |
| length | length of input in bytes |
Implements Botan::EMSA.
Definition at line 96 of file emsa_pkcs1.cpp.
{
message += std::make_pair(input, length);
}
| bool Botan::EMSA_PKCS1v15_Raw::verify | ( | const secure_vector< byte > & | coded, |
| const secure_vector< byte > & | raw, | ||
| size_t | key_bits | ||
| ) | [virtual] |
Verify the encoding
| coded | the received (coded) message representative |
| raw | the computed (local, uncoded) message representative |
| key_bits | the size of the key in bits |
Implements Botan::EMSA.
Definition at line 116 of file emsa_pkcs1.cpp.
{
try
{
return (coded == emsa3_encoding(raw, key_bits, nullptr, 0));
}
catch(...)
{
return false;
}
}
1.7.6.1