MikValSor.Base64 1.0.2

.NET Standard Library for Base64 value type in a style equivalent to MikValSor.Base32

Install-Package MikValSor.Base64 -Version 1.0.2
dotnet add package MikValSor.Base64 --version 1.0.2
<PackageReference Include="MikValSor.Base64" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MikValSor.Base64 --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET Standard Library for Base64 value type in a style equivalent to MikValSor.Base32

Value Type Encode Example:

void ValueTypeEncodeExample()
{
	var bytearray = new byte[] { 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11 };
	MikValSor.Encoding.Base64 base64 = new MikValSor.Encoding.Base64(bytearray);
	
	System.Console.WriteLine($"base64: {base64}");
}
/**
	Output:
	base64: AAECBAUGBwgJCgs=
**/

Value Type Parse Example:

void ValueTypeParseExample()
{
	var base64string = "AAECBAUGBwgJCgs=";
	MikValSor.Encoding.Base64 base64 = MikValSor.Encoding.Base64.Parse(base64string);
	var bytearray = base64.ToByteArray();

	for (var i = 0; i < bytearray.Length; i++)
	{
		System.Console.WriteLine($"bytearray[{i}]: {bytearray[i]}");
	}
}
/**
	Output:
	bytearray[0]: 0
	bytearray[1]: 1
	bytearray[2]: 2
	bytearray[3]: 4
	bytearray[4]: 5
	bytearray[5]: 6
	bytearray[6]: 7
	bytearray[7]: 8
	bytearray[8]: 9
	bytearray[9]: 10
	bytearray[10]: 11
**/

.NET Standard Library for Base64 value type in a style equivalent to MikValSor.Base32

Value Type Encode Example:

void ValueTypeEncodeExample()
{
	var bytearray = new byte[] { 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11 };
	MikValSor.Encoding.Base64 base64 = new MikValSor.Encoding.Base64(bytearray);
	
	System.Console.WriteLine($"base64: {base64}");
}
/**
	Output:
	base64: AAECBAUGBwgJCgs=
**/

Value Type Parse Example:

void ValueTypeParseExample()
{
	var base64string = "AAECBAUGBwgJCgs=";
	MikValSor.Encoding.Base64 base64 = MikValSor.Encoding.Base64.Parse(base64string);
	var bytearray = base64.ToByteArray();

	for (var i = 0; i < bytearray.Length; i++)
	{
		System.Console.WriteLine($"bytearray[{i}]: {bytearray[i]}");
	}
}
/**
	Output:
	bytearray[0]: 0
	bytearray[1]: 1
	bytearray[2]: 2
	bytearray[3]: 4
	bytearray[4]: 5
	bytearray[5]: 6
	bytearray[6]: 7
	bytearray[7]: 8
	bytearray[8]: 9
	bytearray[9]: 10
	bytearray[10]: 11
**/

Release Notes

1.0.2 - Added Icon.
1.0.1 - Made Base64 value type immutable and serializable.
1.0.0 - Initial release.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 3,511 5/8/2018
1.0.1 231 5/3/2018
1.0.0 237 5/1/2018