Open Search
    CryptoKeyInterface Class Reference

    #include <cryptography_key.h>

    Detailed Description

    Stores encryption parameters for a StreamConversionRef class.

    const maxon::Id encoderID = maxon::StreamConversions::AesEncoder.GetId();
    const maxon::Int blockSize = 128;
    const maxon::Char* key = "9USGxEPo0Tx6d8ZRRLbpEc4D88xdU2bb";
    const maxon::Int keySize = 128;
    const maxon::CryptoKey cryptoKey(encoderID, blockSize, key, keySize);
    PyObject * key
    Definition: abstract.h:289
    Reference counted class of CryptoKeyInterface.
    Definition: cryptography_key.h:122
    Definition: apibaseid.h:237
    Int64 Int
    signed 32/64 bit int, size depends on the platform
    Definition: apibase.h:213
    char Char
    signed 8 bit character
    Definition: apibase.h:209

    @MAXON_ANNOTATION{refclass=false}

    Public Member Functions

    MAXON_METHOD const IdGetCryptoAlgorithm () const
     
    MAXON_METHOD Int GetBlockBitSize () const
     
    MAXON_METHOD const void * GetKey1 () const
     
    MAXON_METHOD Int GetKey1BitSize () const
     
    MAXON_METHOD const void * GetKey2 () const
     
    MAXON_METHOD Int GetKey2BitSize () const
     
    MAXON_METHOD UInt64 GetFlags () const
     
    MAXON_METHOD const BLOCK_CIPHER_CTR_CALLBACKGetCallbackFunction () const
     
    MAXON_METHOD String ToString (const FormatStatement *formatStatement=nullptr) const
     

    Static Public Member Functions

    static MAXON_METHOD CryptoKeyInterfaceAlloc (MAXON_SOURCE_LOCATION_DECLARATION, const Id &cryptoAlgorithm, Int blockSizeBits, const void *key1, Int key1BitSize, const void *key2=nullptr, Int key2BitSize=0, UInt64 flags=0, BLOCK_CIPHER_CTR_CALLBACK &&callback=BLOCK_CIPHER_CTR_CALLBACK())
     

    Private Member Functions

     MAXON_INTERFACE_NONVIRTUAL (CryptoKeyInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.cryptokey")
     

    Member Function Documentation

    ◆ MAXON_INTERFACE_NONVIRTUAL()

    MAXON_INTERFACE_NONVIRTUAL ( CryptoKeyInterface  ,
    MAXON_REFERENCE_CONST  ,
    "net.maxon.interface.cryptokey"   
    )
    private

    ◆ Alloc()

    static MAXON_METHOD CryptoKeyInterface* Alloc ( MAXON_SOURCE_LOCATION_DECLARATION  ,
    const Id cryptoAlgorithm,
    Int  blockSizeBits,
    const void *  key1,
    Int  key1BitSize,
    const void *  key2 = nullptr,
    Int  key2BitSize = 0,
    UInt64  flags = 0,
    BLOCK_CIPHER_CTR_CALLBACK &&  callback = BLOCK_CIPHER_CTR_CALLBACK() 
    )
    static

    Allocates the class.

    Parameters
    [in]allocLocationPass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file.
    [in]cryptoAlgorithmId of an encryption algorithm. e.g. StreamConversions::AesEncoder.GetId().
    [in]blockSizeBitsBlocksize of the algorithm in bits.
    [in]key1Pointer to the data of key 1.
    [in]key1BitSizeSize of the key 1 in bits.
    [in]key2Pointer to the data of key 2.
    [in]key2BitSizeSize of the key 2 in bits.
    [in]flagsAdditional flags.
    [in]callbackCallback function for CTR mode. Please consult the documentation of the cryptography algorithm for an explanation.

    ◆ GetCryptoAlgorithm()

    MAXON_METHOD const Id& GetCryptoAlgorithm ( ) const

    Returns the cryptography algorithm.

    Returns
    Id of the used cryptography algorithm.

    ◆ GetBlockBitSize()

    MAXON_METHOD Int GetBlockBitSize ( ) const

    Returns the cryptography block size in bits.

    Returns
    Block size in bits.

    ◆ GetKey1()

    MAXON_METHOD const void* GetKey1 ( ) const

    Returns the cryptography data of key 1.

    Returns
    Pointer to the memory of key 1.

    ◆ GetKey1BitSize()

    MAXON_METHOD Int GetKey1BitSize ( ) const

    Returns the cryptography size of key 1.

    Returns
    Key 1 size in bits.

    ◆ GetKey2()

    MAXON_METHOD const void* GetKey2 ( ) const

    Returns the cryptography data of key 2.

    Returns
    Pointer to the memory of key 2.

    ◆ GetKey2BitSize()

    MAXON_METHOD Int GetKey2BitSize ( ) const

    Returns the cryptography size of key 2.

    Returns
    Key 2 size in bits.

    ◆ GetFlags()

    MAXON_METHOD UInt64 GetFlags ( ) const

    Returns the additional flags.

    Returns
    The flags.

    ◆ GetCallbackFunction()

    MAXON_METHOD const BLOCK_CIPHER_CTR_CALLBACK& GetCallbackFunction ( ) const

    Returns the callback delegate.

    Returns
    The delegate of the callback.

    ◆ ToString()

    MAXON_METHOD String ToString ( const FormatStatement formatStatement = nullptr) const