示例#1
0
        public bool VerifyRecord(DHTRecord record)
        {
            var parts = record.Key.Split('/');

            if (parts.Length < 3)
            {
                return(true);
            }

            if (!_checkers.ContainsKey(parts[1]))
            {
                return(false);
            }

            return(_checkers[parts[1]].Func(record.Key, record.Value));
        }
示例#2
0
 public static bool CheckRecordSignature(DHTRecord record, PublicKey pk) => pk.Verify(record.GetBlob(), record.Signature);