示例#1
0
        public override bool Equals(object obj)
        {
            RsaPubKey item = obj as RsaPubKey;

            if (item == null)
            {
                return(false);
            }
            return(this._Key.Equals(item._Key));
        }
示例#2
0
 public PuzzleSolution Unblind(RsaPubKey rsaPubKey, BlindFactor blind)
 {
     if (rsaPubKey == null)
     {
         throw new ArgumentNullException(nameof(rsaPubKey));
     }
     if (blind == null)
     {
         throw new ArgumentNullException(nameof(blind));
     }
     return(new PuzzleSolution(rsaPubKey.Unblind(this._Value, blind)));
 }
示例#3
0
 public static void ReadWriteC(this BitcoinStream bs, ref RsaPubKey pubKey)
 {
     if (bs.Serializing)
     {
         var bytes = pubKey == null ? new byte[0] : pubKey.ToBytes();
         bs.ReadWriteAsVarString(ref bytes);
     }
     else
     {
         byte[] bytes = null;
         bs.ReadWriteAsVarString(ref bytes);
         pubKey = bytes.Length == 0 ? null : new RsaPubKey(bytes);
     }
 }
示例#4
0
 public Puzzle WithRsaKey(RsaPubKey key)
 {
     return(new Puzzle(key, this));
 }
示例#5
0
 public Puzzle(RsaPubKey rsaPubKey, PuzzleValue puzzleValue)
 {
     this._RsaPubKey   = rsaPubKey ?? throw new ArgumentNullException(nameof(rsaPubKey));
     this._PuzzleValue = puzzleValue ?? throw new ArgumentNullException(nameof(puzzleValue));
 }