Exemplo n.º 1
0
        public I2PIdentHash(string base32addr)
        {
            var st = base32addr;

            if (st.EndsWith(".i2p"))
            {
                st = st.Substring(0, st.Length - 4);
            }
            if (st.EndsWith(".b32"))
            {
                st = st.Substring(0, st.Length - 4);
            }
            Hash       = new BufLen(BufUtils.Base32ToByteArray(st));
            CachedHash = Hash.GetHashCode();
        }
Exemplo n.º 2
0
        static BufLen CreateBase32ParsedBuf(string base32addr)
        {
            var st = base32addr;

            if (st.EndsWith(".i2p", StringComparison.Ordinal))
            {
                st = st.Substring(0, st.Length - 4);
            }
            if (st.EndsWith(".b32", StringComparison.Ordinal))
            {
                st = st.Substring(0, st.Length - 4);
            }
            var buf = new BufLen(BufUtils.Base32ToByteArray(st));

            return(buf);
        }