Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFYn=yC2wfn1M0+Ecm5gmoZTQvGY5O5nuv7YLS+2syuixj2D_A@mail.gmail.com>
Date: Sat, 6 Jul 2013 10:16:01 -0400
From: Yaniv Sapir <yaniv@...pteva.com>
To: john-dev@...ts.openwall.com
Subject: Re: How To Cast cl_uint[] to cl_uchar[]?

Marcus,

cl_uint[] array;
cl_uchar_string[];

string = (cl_uchar *) (array);


However, I suspect that you actually want to keep the same number of array
elements, just convert each *element* to cl_uchar. In this case, you'll
need to loop through the array and convert:

for (i=0; i<length; i ++)
    string[i] = (cl_uchar) array[i]);


Yaniv.


On Sat, Jul 6, 2013 at 9:24 AM, marcus.desto <marcus.desto@...pl> wrote:

> Hello,
>
> does anyone have any idea, how to cast a cl_uint array to a cl_uchar array
> to use it as an string?
>
> Thanks.
>
> Regards,
> Marcus
>



-- 
===========================================================
Yaniv Sapir
Adapteva Inc.
1666 Massachusetts Ave, Suite 14
Lexington, MA 02420
Phone: (781)-328-0513 (x104)
Email: yaniv@...pteva.com
Web: www.adapteva.com
============================================================
CONFIDENTIALITY NOTICE: This e-mail may contain information
that is confidential and proprietary to Adapteva, and Adapteva hereby
designates the information in this e-mail as confidential. The information
is
 intended only for the use of the individual or entity named above. If you
are
not the intended recipient, you are hereby notified that any disclosure,
copying,
distribution or use of any of the information contained in this
transmission is
strictly prohibited and that you should immediately destroy this e-mail and
its
contents and notify Adapteva.
==============================================================

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.