Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to build a QCA:: seccureArray by passing it a parameter of type unsigned char *

    General and Desktop
    2
    3
    2748
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SamFaye last edited by

      I want to encrypt an unsigned char *, for that I must build a secureArray with this unsigned char *

      how can I do?

      1 Reply Last reply Reply Quote 0
      • G
        goetz last edited by

        You can try:

        @
        unsigned char * uCharArray;
        QCA::SecureArray::SecureArray secArray( static_cast<const char *>(uCharArray) );
        @

        But double check whether the conversion from unsigned to signed char does any harm!

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • S
          SamFaye last edited by

          Thanks Volker. I will test that next week. I am on leave

          1 Reply Last reply Reply Quote 0
          • First post
            Last post