DecodeBase64W

Function to decode a BASE64 string into any data output array.

The BASE64 string is measured by the (non-zero) size given or by the terminator.

If output is nullptr the length will be calculated but the string itself will not be generated.

Syntax

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "DecodeBase64W")]
public static extern Int64 x86_DecodeBase64W(byte[] output, string input, Int64 size);

[DllImport(enginedll, EntryPoint = "DecodeBase64W")]
public static extern Int64 x64_DecodeBase64W(byte[] output, string input, Int64 size);

public static Int64 DecodeBase64W(byte[] output, string input, Int64 size)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_DecodeBase64W(output, input, size);
				return _result;
			}
			else
			{
				return x64_DecodeBase64W(output, input, size);
			}
		}

[DllImport(enginedll, EntryPoint = "DecodeBase64W")]
public static extern Int64 x86_DecodeBase64W(byte[] output, byte[] input, Int64 size);

[DllImport(enginedll, EntryPoint = "DecodeBase64W")]
public static extern Int64 x64_DecodeBase64W(byte[] output, byte[] input, Int64 size);

public static Int64 DecodeBase64W(byte[] output, byte[] input, Int64 size)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_DecodeBase64W(output, input, size);
				return _result;
			}
			else
			{
				return x64_DecodeBase64W(output, input, size);
			}
		}    

Property output

Size: 32 bit / 4 byte (reference)
???.

Property input

Size: 32 bit / 4 byte (reference)
???.

Property size

Size: 64 bit / 8 byte (value)
The given size.