annotate NaCl/crypto_verify/16.cs @ 34:70bde4fa6a2f
FBGUI: Fixed image scaling in FBGImageBox
author |
Ivo Smits <Ivo@UCIS.nl> |
date |
Sun, 21 Apr 2013 17:01:03 +0200 |
parents |
c873e3dd73fe |
children |
b5e27116bd2a |
rev |
line source |
20
|
1 ???using System; |
|
2 |
|
3 namespace UCIS.NaCl.crypto_verify { |
|
4 unsafe static class _16 { |
|
5 const int BYTES = 16; |
|
6 public static int crypto_verify(Byte* x, Byte* y) { |
|
7 Int32 differentbits = 0; |
|
8 for (int i = 0; i < 15; i++) differentbits |= x[i] ^ y[i]; |
|
9 return (1 & ((differentbits - 1) >> 8)) - 1; |
|
10 } |
|
11 } |
|
12 } |