@ -383,7 +383,7 @@ namespace DepotDownloader
Config.BetaPassword = password = Console.ReadLine();
}
byte[] input = Utils.DecodeHexString(node_encrypted["encrypted_gid"].Value);
byte[] input = Util.DecodeHexString(node_encrypted["encrypted_gid"].Value);
byte[] manifest_bytes = CryptoHelper.VerifyAndDecryptPassword(input, password);
if (manifest_bytes == null)
@ -167,5 +167,19 @@ namespace DepotDownloader
return output;
public static byte[] DecodeHexString( string hex )
{
if ( hex == null )
return null;
int chars = hex.Length;
byte[] bytes = new byte[ chars / 2 ];
for ( int i = 0 ; i < chars ; i += 2 )
bytes[ i / 2 ] = Convert.ToByte( hex.Substring( i, 2 ), 16 );
return bytes;