Example #1
0
 /// <summary>
 /// Convert the given fingerprint into a security visualization.
 /// http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
 /// </summary>
 /// <param name="Fingerprint">A fingerprint.</param>
 /// <param name="SizeX">The x-size of the visualization.</param>
 /// <param name="SizeY">The y-size of the visualization.</param>
 public static Byte[] DrunkenBishop(Byte[] Fingerprint, Byte SizeX = 17, Byte SizeY = 9)
 {
     return(SecurityVisualization.DrunkenBishop(Fingerprint,
                                                new Byte[SizeX * SizeY],
                                                (Data, CurrentPosition) => Data[CurrentPosition] += 1,
                                                SizeX,
                                                SizeY));
 }
Example #2
0
 /// <summary>
 /// Convert the given fingerprint into a security visualization.
 /// http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
 /// </summary>
 /// <param name="Fingerprint">A fingerprint.</param>
 /// <param name="SizeX">The x-size of the visualization.</param>
 /// <param name="SizeY">The y-size of the visualization.</param>
 public static Byte[] DrunkenBishop(String Fingerprint, Byte SizeX = 17, Byte SizeY = 9)
 {
     return(SecurityVisualization.DrunkenBishop(Fingerprint.
                                                Replace(":", "").
                                                Replace("-", "").
                                                Replace(" ", "").
                                                ToLower().
                                                HexStringToByteArray(),
                                                SizeX,
                                                SizeY));
 }
Example #3
0
 /// <summary>
 /// Convert the given fingerprint into a security visualization.
 /// http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
 /// </summary>
 /// <param name="Fingerprint">A fingerprint.</param>
 /// <param name="SizeX">The x-size of the visualization.</param>
 /// <param name="SizeY">The y-size of the visualization.</param>
 public static List <UInt32> DrunkenEarl(Byte[] Fingerprint, UInt32 SizeX = 17, UInt32 SizeY = 9)
 {
     return(SecurityVisualization.DrunkenBishop(Fingerprint,
                                                new List <UInt32>()
     {
         SizeY / 2 * SizeX + SizeX / 2
     },
                                                (Data, CurrentPosition) => Data.Add(CurrentPosition),
                                                SizeX,
                                                SizeY));
 }
Example #4
0
 /// <summary>
 /// Convert the given fingerprint into a security visualization.
 /// http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
 /// </summary>
 /// <param name="Fingerprint">A fingerprint.</param>
 /// <param name="Data">A data structure to work with.</param>
 /// <param name="Delegate">A delegate which might modify the given data structure at each step.</param>
 /// <param name="SizeX">The x-size of the visualization.</param>
 /// <param name="SizeY">The y-size of the visualization.</param>
 public static T DrunkenBishop <T>(String Fingerprint, T Data, Action <T, UInt32> Delegate, UInt32 SizeX = 17, UInt32 SizeY = 9)
 {
     return(SecurityVisualization.DrunkenBishop(Fingerprint.
                                                Replace(":", "").
                                                Replace("-", "").
                                                Replace(" ", "").
                                                ToLower().
                                                HexStringToByteArray(),
                                                Data,
                                                Delegate,
                                                SizeX,
                                                SizeY));
 }
Example #5
0
 /// <summary>
 /// Convert the given fingerprint into a security visualization.
 /// http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
 /// </summary>
 /// <param name="Fingerprint">A fingerprint.</param>
 /// <param name="SizeX">The x-size of the visualization.</param>
 /// <param name="SizeY">The y-size of the visualization.</param>
 public static List <UInt32> DrunkenEarl(String Fingerprint, UInt32 SizeX = 17, UInt32 SizeY = 9)
 {
     return(SecurityVisualization.DrunkenBishop(Fingerprint.
                                                Replace(":", "").
                                                Replace("-", "").
                                                Replace(" ", "").
                                                ToLower().
                                                HexStringToByteArray(),
                                                new List <UInt32>()
     {
         SizeY / 2 * SizeX + SizeX / 2
     },
                                                (Data, CurrentPosition) => Data.Add(CurrentPosition),
                                                SizeX,
                                                SizeY));
 }