- Soren
Date: Thu, 14 Sep 2006 16:17:47 -0500
From: [EMAIL PROTECTED]
To: [email protected]
Subject: Where did CipherTextLength go to hideout?
I have the following code I am trying to compile. BUT I'm getting this error
E:\Crypto++\Samples\Encrypt\Encrypt.cpp(20) : error C2039: 'CipherTextLength' : is not a member of 'PK_FinalTemplate<class CryptoPP::TF_EncryptorImpl<struct CryptoPP::TF_CryptoSchemeOptions<class CryptoPP::TF_ES<struct CryptoPP::PKCS1v15,struct Cryp
toPP::RSA,int>,struct CryptoPP::RSA,class CryptoPP::PKCS_EncryptionPaddingScheme> > >'
#include "stdafx.h"
#include <string>
#include <Crypto++/rsa.h>
#include <Crypto++/osrng.h>
#include <Crypto++/files.h>
#include <Crypto++/base64.h>
int main(int argc, char* argv[])
{
std::string strShortString =
"Must be shorter than the size of the RSA key minus OAEP decoration.";
CryptoPP::RSAES_PKCS1v15_Encryptor pubkey(CryptoPP::FileSource("../pubkey.txt", true, new CryptoPP::Base64Decoder));
// Cannot use std::string for buffer;
// its internal storage might not be contiguous
CryptoPP::SecByteBlock sbbCipherText(pubkey.CipherTextLength(strShortString.size()));
Windows Live Spaces is here! It’s easy to create your own personal Web site. Check it out!
