Convert Python code to C#
€8-30 EUR
Pagado a la entrega
Hi
I have a python function that can decrypt an URI that I need in C#
This is approx the code:
def bytes_to_intlist(bs):
if not bs:
return []
if isinstance(bs[0], int): # Python 3
return list(bs)
else:
return [ord(c) for c in bs]
def hex_to_bytes(hex):
return binascii.a2b_hex([login to view URL]('ascii'))
def decrypt_uri(e):
n = int(e[2:10], 16)
a = e[10 + n:]
data = bytes_to_intlist(hex_to_bytes(e[10:10 + n]))
key = bytes_to_intlist([login to view URL](
('%s:sRBzYNXBzkKgnjj8pGtkACch' % a).encode('utf-8')).digest())
iv = bytes_to_intlist(hex_to_bytes(a))
decrypted = aes_cbc_decrypt(data, key, iv)
return intlist_to_bytes(
decrypted[:-decrypted[-1]]).decode('utf-8').split('?')[0]
Full sourcecode:
[login to view URL]
It's only the decrypt_uri I need
Nº del proyecto: #18649367
Sobre el proyecto
5 freelancers están ofertando un promedio de €25 por este trabajo
• 10+ years of professional experience in C#/.NET software development; • 5+ years Experience with ASP.NET MVC , LINQ , EF , SQL; • 10+ years Experience with PHP/MySQL; • 7+ years Experience with App development And Más
Hi there , i'm expert in c# programming language and i'm sure that i can help you to convert this python code into c# , contact me to discuss further details , thanks .
"""I have checked what u need please see my certified tests Let us discuss in chat to start it happy to speak with u thanks sadek"""