Mercurial > hg > ucis.core
view NaCl/crypto_verify/16.cs @ 54:ba4e2cb031e0
Added general purpose tar archive reader class
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 02 Oct 2013 21:17:30 +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; } } }