Example #1
0
bool RSA_Encryptor<Pad>::SSL_Verify(const byte* message, word32 sz,
                                    const byte* sig)
{
    ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength());
    SSL_Decrypt(key_, sig, plain.get_buffer());

    if ( (memcmp(plain.get_buffer(), message, sz)) == 0)
        return true;
    return false;
}
Example #2
0
 word32 FixedCiphertextLength()
 {
     return PK_Lengths(n_).FixedCiphertextLength();
 }