Base64Url.TryDecodeFromChars Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Decodes the span of unicode ASCII chars represented as Base64Url into binary data.
public:
static bool TryDecodeFromChars(ReadOnlySpan<char> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryDecodeFromChars (ReadOnlySpan<char> source, Span<byte> destination, out int bytesWritten);
static member TryDecodeFromChars : ReadOnlySpan<char> * Span<byte> * int -> bool
Public Shared Function TryDecodeFromChars (source As ReadOnlySpan(Of Char), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
Parameters
- source
- ReadOnlySpan<Char>
The input span which contains ASCII chars in Base64Url that needs to be decoded.
The output span which contains the result of the operation, i.e. the decoded binary data.
- bytesWritten
- Int32
When this method returns, contains the number of bytes written into the output span. This can be used to slice the output for subsequent calls, if necessary. This parameter is treated as uninitialized.
Returns
true
if bytes decoded successfully; false
if destination
is too small.
Exceptions
source
contains an invalid Base64Url character,
more than two padding characters, or a non white space character among the padding characters.