MCPcopy Create free account
hub / github.com/christophhart/HISE / decryptWithRSA

Method decryptWithRSA

hi_scripting/scripting/api/ScriptingApi.cpp:7308–7326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7306
7307
7308String ScriptingApi::FileSystem::decryptWithRSA(const String& dataToDecrypt, const String& publicKey)
7309{
7310 BigInteger val;
7311 val.parseString (dataToDecrypt, 16);
7312
7313 RSAKey key (publicKey);
7314
7315 if(key.isValid())
7316 {
7317 key.applyToValue (val);
7318
7319 auto mb = val.toMemoryBlock();
7320
7321 if (CharPointer_UTF8::isValidString (static_cast<const char*> (mb.getData()), (int) mb.getSize()))
7322 return mb.toString();
7323 }
7324
7325 return {};
7326}
7327
7328void ScriptingApi::FileSystem::loadExampleAssets()
7329{

Callers

nothing calls this directly

Calls 7

applyToValueMethod · 0.80
parseStringMethod · 0.45
isValidMethod · 0.45
toMemoryBlockMethod · 0.45
getDataMethod · 0.45
getSizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected