mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
Added base64 decode function to the Value Generator (#27835)
This commit is contained in:
@@ -121,6 +121,12 @@ namespace Community.PowerToys.Run.Plugin.ValueGenerator
|
||||
string content = query.RawUserQuery.Substring(commandIndex + command.Length).Trim();
|
||||
request = new Base64Request(Encoding.UTF8.GetBytes(content));
|
||||
}
|
||||
else if (command.ToLower(null) == "base64d")
|
||||
{
|
||||
int commandIndex = query.RawUserQuery.IndexOf(command, StringComparison.InvariantCultureIgnoreCase);
|
||||
string content = query.RawUserQuery.Substring(commandIndex + command.Length).Trim();
|
||||
request = new Base64DecodeRequest(content);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FormatException($"Invalid Query: {query.RawUserQuery}");
|
||||
|
||||
Reference in New Issue
Block a user