lkml.org 
[lkml]   [2004]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dm-crypt using kthread
Andrew Morton wrote:
>>+static void crypt_encode_key(char *hex, u8 *key, int size)
>>+{
>>+ static char hex_digits[] = "0123456789abcdef";
>>+ int i;
>>+
>>+ for(i = 0; i < size; i++) {
>>+ *hex++ = hex_digits[*key >> 4];
>>+ *hex++ = hex_digits[*key & 0x0f];
>>+ key++;
>>+ }
>>+
>>+ *hex++ = '\0';
>>+}
>
>
> sprintf("%02x")?


I was thinking that too. How often do we encode the key? If not often
(and I would guess not), sprintf would be more than sufficient.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.538 / U:1.076 seconds]
©2003-2014 Jasper Spaans. Advertise on this site