public static string AddresstTou160(string addressencoded)
        {
            var decoded = Base58Encoding.Decode(addressencoded);

            var programhash = Crypto.ByteArrayToHexString(decoded).Substring(2, 40);
            var add58       = U160ToAddress(programhash);
            var result      = add58 != addressencoded ? string.Empty : programhash;

            return(result);
        }
        public static string U160ToAddress(string hash)
        {
            var data = "17" + hash;

            var programSha256       = Crypto.SHA256ByteArray(Crypto.HexStringToByteArray(data));
            var programSha2562      = Crypto.SHA256ByteArray(Crypto.HexStringToByteArray(programSha256));
            var programSha256Buffer = Crypto.HexStringToByteArray(programSha2562);

            var datas = data + programSha2562.Substring(0, 8).ToLower();

            return(Base58Encoding.Encode(Crypto.HexStringToByteArray(datas)));
        }