class CCL::Security::Crypto::RSA

#include <cryptobox.h>

class RSA
{
public:
    // enums

    enum Constants;

    // methods

    static bool generateKeyPair (
        IStream& privateKey,
        IStream& publicKey,
        BlockRef randomData = Block (),
        uint32 keyLength = kDefaultKeyLength
    );

    static bool encrypt (
        IStream& cipherData,
        IStream& publicKey,
        IStream& plainData,
        BlockRef randomData = Block ()
    );

    static bool decrypt (
        IStream& plainData,
        IStream& privateKey,
        IStream& cipherData
    );

    static bool sign (
        IStream& signature,
        IStream& privateKey,
        IStream& data,
        Hash hash = kHashSHA1
    );

    static bool verify (
        IStream& data,
        IStream& publicKey,
        IStream& signature,
        Hash hash = kHashSHA1
    );
};