view 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
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;
		}
	}
}