Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

validate base64 string c#

public static bool IsBase64String(string base64)
{
   Span<byte> buffer = new Span<byte>(new byte[base64.Length]);
   return Convert.TryFromBase64String(base64, buffer , out int bytesParsed);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #validate #string
ADD COMMENT
Topic
Name
2+7 =