[Nickle] Re: rijndael example

Bart Massey bart at cs.pdx.edu
Mon Jun 9 22:22:41 PDT 2003


Uh, the example predates the incompatible Nickle change of
some time ago which introduced a boolean type and required
it in the obvious places.  Needs to be fixed in the obvious
way.  If you or your student wants to get it, great:
otherwise I'll do so in a couple of days. Thanks for the
note!

	Bart

In message <Pine.GSO.4.21.0306092054230.24764-100000 at sirius.cs.pdx.edu> you wrote:
> 
> Bart,
> 
> I decided to play with the rijndael example from the nickle web page. I
> downloaded it into rijndael.5c and invoked nickle this way on sirius:
> 
> nickle rijndael.5c
> 
> I get this which looks like an error. Is it something I did?
> 
> --mark
> 
> -> rijndael.5c:191: Incompatible type, value 'int', for boolean
> -> rijndael.5c:191: Incompatible type, value 'int', for boolean
> ->     if (a && b)
> rijndael.5c:191: Incompatible types, left 'int', right 'int', for &&
> operation
> ->     if (key == 0 || key->direction != DIR_ENCRYPT || key->keyLen != 128
> && key->keyLen != 192 && key->keyLen != 256)
> rijndael.5c:672: Incompatible types, left '*keyInstance', right 'int', for
> == operation
> ->     if (cipher == 0 || cipher->mode != MODE_ECB && cipher->mode !=
> MODE_CBC && cipher->mode != MODE_CFB1 || cipher->blockLen != 128 &&
> cipher->blockLen != 192 && cipher->blockLen != 256)
> rijndael.5c:677: Incompatible types, left '*cipherInstance', right 'int',
> for == operation
> ->     if (cipher == 0 || key == 0 || key->direction == DIR_ENCRYPT ||
> cipher->blockLen != key->blockLen)
> rijndael.5c:748: Incompatible types, left '*cipherInstance', right 'int',
> for == operation
> ->     if (cipher == 0 || key == 0 || key->direction == DIR_ENCRYPT ||
> cipher->blockLen != key->blockLen)
> rijndael.5c:748: Incompatible types, left '*keyInstance', right 'int', for
> == operation
> ->     if (key == 0 || key->direction != DIR_DECRYPT || key->keyLen != 128
> && key->keyLen != 192 && key->keyLen != 256)
> rijndael.5c:757: Incompatible types, left '*keyInstance', right 'int', for
> == operation
> ->     if (cipher == 0 || cipher->mode != MODE_ECB && cipher->mode !=
> MODE_CBC && cipher->mode != MODE_CFB1 || cipher->blockLen != 128 &&
> cipher->blockLen != 192 && cipher->blockLen != 256)
> rijndael.5c:764: Incompatible types, left '*cipherInstance', right 'int',
> for == operation
> ->     if (cipher == 0 || key == 0 || cipher->blockLen != key->blockLen)
> rijndael.5c:861: Incompatible types, left '*cipherInstance', right 'int',
> for == operation
> ->     if (cipher == 0 || key == 0 || cipher->blockLen != key->blockLen)
> rijndael.5c:861: Incompatible types, left '*keyInstance', right 'int', for
> == operation
> -> rijndael.5c:918: Incompatible type, value 'int', for boolean
> ->     for (i = 0; i < dim (a) && a[i]; i++)
> rijndael.5c:918: Incompatible types, left 'bool', right 'int', for &&
> operation
> Unhandled exception "uninitialized_value" at rijndae
> 



More information about the Nickle mailing list