32 references to Base64
Microsoft.Extensions.AI.Abstractions (1)
Contents\DataUriParser.cs (1)
149
return
Base64
.IsValid(value) && !value.ContainsAny(" \t\r\n");
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceEmbeddingGenerator.cs (2)
134
byte[] bytes = ArrayPool<byte>.Shared.Rent(
Base64
.GetMaxDecodedFromUtf8Length(base64.Length));
135
OperationStatus status =
Base64
.DecodeFromUtf8(base64, bytes.AsSpan(), out int bytesConsumed, out int bytesWritten);
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValue.cs (2)
547
Base64
.GetMaxEncodedToUtf8Length(Encoding.UTF8.GetByteCount(input.AsSpan())) +
559
Base64
.EncodeToUtf8InPlace(bufferContent, contentLength, out var base64ContentLength);
mscorlib (1)
mscorlib.cs (1)
50
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.
Base64
))]
netstandard (1)
netstandard.cs (1)
77
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.
Base64
))]
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\Base64StringAttribute.cs (1)
48
return
Base64
.IsValid(valueAsString);
System.Memory (1)
artifacts\obj\System.Memory\Debug\net10.0\System.Memory.Forwards.cs (1)
10
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.
Base64
))]
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (1)
1270
public int GetMaxDecodedLength(int utf8Length) =>
Base64
.GetMaxDecodedFromUtf8Length(utf8Length);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (2)
691
srcLength <= MaximumEncodeLength && destLength >=
Base64
.GetMaxEncodedToUtf8Length(srcLength) ?
696
public int GetMaxEncodedLength(int srcLength) =>
Base64
.GetMaxEncodedToUtf8Length(srcLength);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2482
OperationStatus status =
Base64
.EncodeToUtf8(bytes, MemoryMarshal.AsBytes(chars), out _, out int bytesWritten);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
64
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.
Base64
))]
System.Security.Cryptography (7)
System\Security\Cryptography\Base64Transforms.cs (4)
51
OperationStatus status =
Base64
.EncodeToUtf8(input, output, out int consumed, out int written, isFinalBlock: false);
76
OperationStatus status =
Base64
.EncodeToUtf8(input, output, out int consumed, out int written, isFinalBlock: true);
272
int outputSize =
Base64
.GetMaxDecodedFromUtf8Length(bytesToTransform);
304
OperationStatus status =
Base64
.DecodeFromUtf8(transformBuffer, outputBuffer, out consumed, out written);
System\Security\Cryptography\PemEncoding.cs (3)
748
return
Base64
.IsValid(base64Text, out decodedLength);
775
return
Base64
.IsValid(base64Text, out decodedLength);
780
OperationStatus status =
Base64
.EncodeToUtf8(
System.Text.Json (11)
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (2)
208
OperationStatus status =
Base64
.DecodeFromUtf8InPlace(utf8Unescaped, out int bytesWritten);
226
OperationStatus status =
Base64
.DecodeFromUtf8(utf8Unescaped, byteSpan, out int bytesConsumed, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
211
int encodedLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
246
int encodedLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
285
int encodedLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
335
int encodedLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (2)
61
int encodingLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
104
int encodingLength =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (1)
131
OperationStatus status =
Base64
.EncodeToUtf8(bytes, destination, out int consumed, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (2)
361
if (value.Length >
Base64
.GetMaxDecodedFromUtf8Length(int.MaxValue))
447
int requiredBytes =
Base64
.GetMaxEncodedToUtf8Length(bytes.Length);