Mercurial > hg > ucis.core
view NaCl/crypto_verify/16.cs @ 88:c9da306e06c9
FBGUI: Improved FBGContainerControl thread safety
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Tue, 11 Mar 2014 17:45:48 +0100 |
parents | b5e27116bd2a |
children |
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 < 16; i++) differentbits |= x[i] ^ y[i]; return (1 & ((differentbits - 1) >> 8)) - 1; } } }