How can I turn a variable-length byte array into an integer in PowerShell?
I'm working with ASN.1 encoding and want to convert byte arrays of different lengths to integers without writing a separate case for each length. BitConverter.ToInt32 expects four bytes,…