public bool TestRailFenceDecode() { RailFence railFence = new RailFence(cipher: "otteunwh reorf eo", key: "4"); (var plain, _) = railFence.Decode(); Print(railFence.Cipher, railFence.Key, plain); return(plain == "one two three four"); }
public bool TestRailFenceBreak() { RailFence railFence = new RailFence(cipher: "otteunwh reorf eo"); (var plain, var prob) = railFence.Break(); Print(railFence.Cipher, railFence.Key, plain, prob); return(plain == "one two three four"); }
public bool TestRailFenceEncode() { RailFence railFence = new RailFence(plain: "one two three four", key: "4"); (var cipher, _) = railFence.Encode(); Print(railFence.Plain, railFence.Key, cipher); return(cipher == "otteunwh reorf eo"); }