mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 04:55:42 +00:00
(#15) Rewrite xmldoc for Base64Encode/Decode
This commit is contained in:
parent
f71efc424d
commit
a3815a1e10
@ -32,20 +32,20 @@ namespace X10D.StringExtensions
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Decodes a base-64 encoded string.
|
/// Converts the specified string, which encodes binary data as base-64 digits, to an equivalent plain text string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data">The base-64 string to decode.</param>
|
/// <param name="value">The base-64 string to convert.</param>
|
||||||
/// <returns>Returns the string in plain text.</returns>
|
/// <returns>The plain text string representation of <paramref name="value" />.</returns>
|
||||||
public static string Base64Decode(this string data)
|
public static string Base64Decode(this string value)
|
||||||
{
|
{
|
||||||
return Convert.FromBase64String(data).ToString(Encoding.ASCII);
|
return Convert.FromBase64String(value).ToString(Encoding.ASCII);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Encodes a base-64 encoded string.
|
/// Converts the current string to its equivalent string representation that is encoded with base-64 digits.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The plain text string to decode.</param>
|
/// <param name="value">The plain text string to convert.</param>
|
||||||
/// <returns>Returns the string in plain text.</returns>
|
/// <returns>The string representation, in base 64, of <paramref name="value" />.</returns>
|
||||||
public static string Base64Encode(this string value)
|
public static string Base64Encode(this string value)
|
||||||
{
|
{
|
||||||
return Convert.ToBase64String(value.GetBytes(Encoding.ASCII));
|
return Convert.ToBase64String(value.GetBytes(Encoding.ASCII));
|
||||||
|
Loading…
Reference in New Issue
Block a user