Convert Python code to C#

En curso Publicado hace 5 años Pagado a la entrega
En curso 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

Programación en C# Python

Nº del proyecto: #18649367

Sobre el proyecto

5 propuestas Proyecto remoto Activo hace 5 años

5 freelancers están ofertando un promedio de €25 por este trabajo

Mickelson

Hi Nice to meet you. I have enough experience in python script. Below the libraries are I used in past project. pandas, matplotlib, lxml, beautifulsoup, scipy, and other useful libraries. I have written some autom Más

€29 EUR en 1 día
(100 comentarios)
6.7
ONYEMATeam

• 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

€29 EUR en 1 día
(15 comentarios)
5.2
abbasJz

Dear employer, Hi I have done my M.Sc. thesis using Python and MATLAB. It was about developing a numerical model for simulating fluids flow through porous media. I developed the main code in Python and developed Más

€30 EUR en 1 día
(29 comentarios)
4.7
HaryCoders

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 .

€10 EUR en 1 día
(16 comentarios)
4.2
konanhenry1111

"""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"""

€29 EUR en 1 día
(3 comentarios)
2.4