示例#1
0
        public Metainfo ToMetainfo(out byte[] bytes)
        {
            BencodedValue entries = Build();

            bytes = Bencoder.Encode(entries);
            return(MetainfoFactory.FromBytes(bytes));
        }
示例#2
0
        public FileHash ToHash()
        {
            BencodedValue entries = Build();

            byte[] bytes = Bencoder.Encode(entries);

            Metainfo metainfo = MetainfoFactory.FromBytes(bytes);
            FileHash hash     = metainfo.Hash;

            return(hash);
        }