MCPcopy Create free account
hub / github.com/c3d/tao3D / RSAEncryptString

Function RSAEncryptString

libcryptopp/cryptopp/test.cpp:404–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404string RSAEncryptString(const char *pubFilename, const char *seed, const char *message)
405{
406 FileSource pubFile(pubFilename, true, new HexDecoder);
407 RSAES_OAEP_SHA_Encryptor pub(pubFile);
408
409 RandomPool randPool;
410 randPool.IncorporateEntropy((byte *)seed, strlen(seed));
411
412 string result;
413 StringSource(message, true, new PK_EncryptorFilter(randPool, pub, new HexEncoder(new StringSink(result))));
414 return result;
415}
416
417string RSADecryptString(const char *privFilename, const char *ciphertext)
418{

Callers 1

CRYPTOPP_API mainFunction · 0.85

Calls 2

StringSourceFunction · 0.85
IncorporateEntropyMethod · 0.45

Tested by

no test coverage detected