I'm reading this code sample:
And since I don't know C#, I decided to give it a go.
While compiling I've got this message:
Main.cs(32,65): error CS1061: Type `string' does not contain a definition for `Base64ToHex' and no extension method `Base64ToHex' of type `string' could be found (are you missing a using directive or an assembly reference?)
Compilation failed: 1 error(s), 0 warnings
I've look in MSDN and as expected I didn't find a reference for that method.
Question: Where did that method came from?
p.s. My code looks like:
using System.Security.Cryptography;
using System.Text;
using System;
class MainClass
{
public static string Encrypt(string toEncrypt, string key, bool useHashing)
{
..... // same as in post
.....
}
public static void Main( string [] args )
{
string key = "secret";
Console.WriteLine( Encrypt("oscar" + "000", key, true ).Base64ToHex() );
}
}