Пример #1
0
        public void CalculateInfoHash_CompleteTorrentFile()
        {
            var bdictionary = new BencodeParser().Parse <BDictionary>(UbuntuTorrentFile);
            var info        = bdictionary.Get <BDictionary>(TorrentFields.Info);
            var hash        = TorrentUtil.CalculateInfoHash(info);

            hash.Should().Be("B415C913643E5FF49FE37D304BBB5E6E11AD5101");
        }
Пример #2
0
        public void CalculateInfoHash_CompleteTorrentFile()
        {
            var bdictionary = new BencodeParser().Parse<BDictionary>(UbuntuTorrentFile);
            var info = bdictionary.Get<BDictionary>(TorrentFields.Info);
            var hash = TorrentUtil.CalculateInfoHash(info);

            hash.Should().Be("B415C913643E5FF49FE37D304BBB5E6E11AD5101");
        }