Browse Source

Remove unnecessary casts in the Sober128 implementation

Richard Levitte 1 year ago
parent
commit
b98ef26112
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/stream/sober128/sober128_stream.c

+ 2 - 2
src/stream/sober128/sober128_stream.c

@@ -172,7 +172,7 @@ int sober128_stream_setup(sober128_state *st, const unsigned char *key, unsigned
    st->konst = INITKONST;
    st->konst = INITKONST;
 
 
    for (i = 0; i < keylen; i += 4) {
    for (i = 0; i < keylen; i += 4) {
-      k = BYTE2WORD((unsigned char *)&key[i]);
+      k = BYTE2WORD(&key[i]);
       ADDKEY(k);
       ADDKEY(k);
       cycle(st->R);
       cycle(st->R);
       XORNL(nltap(st));
       XORNL(nltap(st));
@@ -214,7 +214,7 @@ int sober128_stream_setiv(sober128_state *st, const unsigned char *iv, unsigned
    }
    }
 
 
    for (i = 0; i < ivlen; i += 4) {
    for (i = 0; i < ivlen; i += 4) {
-      k = BYTE2WORD((unsigned char *)&iv[i]);
+      k = BYTE2WORD(&iv[i]);
       ADDKEY(k);
       ADDKEY(k);
       cycle(st->R);
       cycle(st->R);
       XORNL(nltap(st));
       XORNL(nltap(st));