using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
namespace FStore.Utils
{
///
/// Class containing utilities used internally and available for external use
///
public static class PublicUtils
{
///
/// Takes a string and turns it into a base-64 Unicode string
///
/// The string to convert to base-64
/// The base-64 string
public static string UAsBase64(this string data)
{
return UAsBase64(data, Encoding.Unicode);
}
///
/// Takes a string and turns it into a base-64 string of a given encoding
///
/// The string to convert to base-64
/// The encoding to use
/// The base-64 string
public static string UAsBase64(this string data, Encoding enc)
{
return Convert.ToBase64String(enc.GetBytes(data));
}
}
}