Mercurial > hg > ucis.core
view NaCl/crypto_verify/16.cs @ 50:556b4fb511bd
Added HWLib and USBLib functions to support USB Driver Installer
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Mon, 30 Sep 2013 19:23:09 +0200 |
parents | c873e3dd73fe |
children | b5e27116bd2a |
line wrap: on
line source
???using System; namespace UCIS.NaCl.crypto_verify { unsafe static class _16 { const int BYTES = 16; public static int crypto_verify(Byte* x, Byte* y) { Int32 differentbits = 0; for (int i = 0; i < 15; i++) differentbits |= x[i] ^ y[i]; return (1 & ((differentbits - 1) >> 8)) - 1; } } }