I’m trying to implement licensing via RSA mechanism in Juce, but after decrypting, I get complete trash instead of what was encrypted. I tried to debug it with the following simple code:
RSAKey keyPublic; RSAKey keyPrivate; RSAKey::createKeyPair(keyPublic, keyPrivate, 128); ...skipping code that fills memory block mb1... BitArray val; val.loadFromMemoryBlock(mb1); keyPrivate.applyToValue(val); keyPublic.applyToValue(val); const MemoryBlock mb2(val.toMemoryBlock());
And as a result, I get trash data in mb2 block, although as I understand, mb2 block should be the same as mb1, right? What can be wrong with all this?