class axl::cry::EcKey

#include <axl_cry_EcKey.h>

class EcKey: public axl::sl::Handle
{
public:
    // construction

    EcKey();
    EcKey(uint_t curveId);
    EcKey(EC_KEY* h);

    // methods

    bool
    create();

    bool
    create(uint_t curveId);

    bool
    createCopy(EC_KEY* src);

    bool
    copy(EC_KEY* src);

    uint_t
    getFlags();

    void
    addFlags(uint_t flags);

    void
    removeFlags(uint_t flags);

    void
    setFlags(uint_t flags);

    uint_t
    getEncFlags();

    void
    setEncFlags(uint_t flags);

    EC_GROUP*
    getGroup();

    bool
    setGroup(EC_GROUP* group);

    BIGNUM*
    getPrivateKey();

    bool
    setPrivateKey(BIGNUM* key);

    bool
    setPrivateKeyData(
        const void* p,
        size_t size
        );

    bool
    setPrivateKeyDecString(const sl::StringRef& string);

    bool
    setPrivateKeyHexString(const sl::StringRef& string);

    EC_POINT*
    getPublicKey();

    bool
    setPublicKey(EC_POINT* key);

    bool
    setPublicKeyData(
        const void* p,
        size_t size,
        BN_CTX* ctx = NULL
        );

    bool
    setPublicKeyDecString(
        const sl::StringRef& string,
        BN_CTX* ctx = NULL
        );

    bool
    setPublicKeyHexString(
        const sl::StringRef& string,
        BN_CTX* ctx = NULL
        );

    bool
    generateKey();

    size_t
    getMaxSignatureSize();

    size_t
    signHash(
        void* signature,
        size_t signatureSize,
        const void* hash,
        size_t hashSize
        );

    bool
    signHash(
        sl::Array<char>* signature,
        const void* hash,
        size_t hashSize
        );

    sl::Array<char>
    signHash(
        const void* hash,
        size_t hashSize
        );

    bool
    sign(
        sl::Array<char>* signature,
        const void* p,
        size_t size
        );

    sl::Array<char>
    sign(
        const void* p,
        size_t size
        );

    bool
    verifyHash(
        const void* hash,
        size_t hashSize,
        const void* signature,
        size_t signatureSize
        );

    bool
    verify(
        const void* p,
        size_t size,
        const void* signature,
        size_t signatureSize
        );
};

Inherited Members

public:
    // typedefs

    typedef T H;

    // methods

    operator T() const;

    T
    operator->() const;

    const Handle&
    operator=(T h);

    bool
    isOpen() const;

    void
    close();

    void
    attach(T h);

    T
    detach();

    T*
    p();

    static
    T
    getInvalidHandle();