RSAKey::applyToValue assertion


#1

Hi there,

I’m trying to use RSA encryption, but I hit this assertion :

bool RSAKey::applyToValue (BitArray& value) const throw()
{
    if (part1.isEmpty() || part2.isEmpty()
         || value.compare (0) <= 0)
    {
        jassertfalse   // using an uninitialised key

this is because the values passed as argument are sometime negative,

Is there a real reason why

is not

?


#2

Well, I don’t think the algorithm will actually work with negative numbers - if you need to encrypt them, you should probably turn them into some other format first.