MCPcopy Create free account
hub / github.com/LUX-Core/lux / RSAEncryptString

Function RSAEncryptString

src/cryptopp/test.cpp:509–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509string RSAEncryptString(const char *pubFilename, const char *seed, const char *message)
510{
511 FileSource pubFile(pubFilename, true, new HexDecoder);
512 RSAES_OAEP_SHA_Encryptor pub(pubFile);
513
514 RandomPool randPool;
515 randPool.IncorporateEntropy((byte *)seed, strlen(seed));
516
517 string result;
518 StringSource(message, true, new PK_EncryptorFilter(randPool, pub, new HexEncoder(new StringSink(result))));
519 return result;
520}
521
522string RSADecryptString(const char *privFilename, const char *ciphertext)
523{

Callers 1

CRYPTOPP_API mainFunction · 0.85

Calls 2

StringSourceFunction · 0.70
IncorporateEntropyMethod · 0.45

Tested by

no test coverage detected