32 references to Base64
Microsoft.Extensions.AI.Abstractions (1)
Contents\DataUriParser.cs (1)
149return Base64.IsValid(value) && !value.ContainsAny(" \t\r\n");
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceEmbeddingGenerator.cs (2)
134byte[] bytes = ArrayPool<byte>.Shared.Rent(Base64.GetMaxDecodedFromUtf8Length(base64.Length)); 135OperationStatus status = Base64.DecodeFromUtf8(base64, bytes.AsSpan(), out int bytesConsumed, out int bytesWritten);
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValue.cs (2)
547Base64.GetMaxEncodedToUtf8Length(Encoding.UTF8.GetByteCount(input.AsSpan())) + 559Base64.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)
48return 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)
1270public int GetMaxDecodedLength(int utf8Length) => Base64.GetMaxDecodedFromUtf8Length(utf8Length);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (2)
691srcLength <= MaximumEncodeLength && destLength >= Base64.GetMaxEncodedToUtf8Length(srcLength) ? 696public int GetMaxEncodedLength(int srcLength) => Base64.GetMaxEncodedToUtf8Length(srcLength);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2482OperationStatus 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)
51OperationStatus status = Base64.EncodeToUtf8(input, output, out int consumed, out int written, isFinalBlock: false); 76OperationStatus status = Base64.EncodeToUtf8(input, output, out int consumed, out int written, isFinalBlock: true); 272int outputSize = Base64.GetMaxDecodedFromUtf8Length(bytesToTransform); 304OperationStatus status = Base64.DecodeFromUtf8(transformBuffer, outputBuffer, out consumed, out written);
System\Security\Cryptography\PemEncoding.cs (3)
748return Base64.IsValid(base64Text, out decodedLength); 775return Base64.IsValid(base64Text, out decodedLength); 780OperationStatus status = Base64.EncodeToUtf8(
System.Text.Json (11)
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (2)
208OperationStatus status = Base64.DecodeFromUtf8InPlace(utf8Unescaped, out int bytesWritten); 226OperationStatus status = Base64.DecodeFromUtf8(utf8Unescaped, byteSpan, out int bytesConsumed, out int bytesWritten);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
211int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); 246int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); 285int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); 335int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (2)
61int encodingLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); 104int encodingLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (1)
131OperationStatus status = Base64.EncodeToUtf8(bytes, destination, out int consumed, out int written);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (2)
361if (value.Length > Base64.GetMaxDecodedFromUtf8Length(int.MaxValue)) 447int requiredBytes = Base64.GetMaxEncodedToUtf8Length(bytes.Length);