
Convert a function's Php code to C # .net
$10-30 USD
Pago na entrega
Function getCRC16($value) {
$polinomio = 0x1021;
$resultado = 0xFFFF;
//CHECKSUM
if (($length = strlen($value)) > 0) {
for ($offset = 0; $offset < $length; $offset++) {
$resultado ^= (ord($value[$offset]) << 8);
for ($bitwise = 0; $bitwise < 8; $bitwise++) {
if (($resultado <<= 1) & 0x10000) $resultado ^= $polinomio;
$resultado &= 0xFFFF;
}
}
}
return strtoupper(dechex($resultado));
}
This function reproduces these results:
echo getCRC16('261cca7aa11aabe18c128fb9c3b0d992').'</Br>'; //Result C810
echo getCRC16('4ef3e8c323abb5938ff5d9522a28bc14').'</Br>'; //Result 878E
echo getCRC16('d32eeb8baab8af828c2ca6f044d36c5c').'</Br>'; //Result 5ACF
echo getCRC16('99981123fcc3021fef7a955659404ce4').'</Br>'; //Result 89BB
echo getCRC16('a536f162f1775f2d5ed6336c9b3524dc').'</br>'; //Result 2EAD
ID do Projeto: #29391334
Sobre o projeto
Concedido a:
Dear Sir, I will be glad to help you port your PHP code to C#. I have good experience with both languages. I also speak Portuguese if that would be easier for you. Thank you for considering my proposal. Best regards Mais
2 freelancers estão ofertando em média $25 nesse trabalho
Hi. I have written many automation .NET C# apps. Ready to write your project. Will complete within some hours