Ejemplo n.º 1
0
 public void VerifySignature(SignedAction action, IPeer peer)
 {
     if (!action.Signature.Verify(action.Action.Serialize(), peer.PublicKey) &&
         !action.OldSignature.Verify(action.Action.Serialize(), peer.PublicKey))
     {
         throw new InvalidOperationException("Source Signature is not valid");
     }
 }
Ejemplo n.º 2
0
        public bool Update(AgentId subjectId, SignedAction signedAction)
        {
            if (!_actor.Account.IsConnectedTo(subjectId))
            {
                return(false);
            }
            var peer = _actor.Account.GetPeer(subjectId);

            _actor.Account.VerifySignature(signedAction, peer);
            UpdatePeer(peer, signedAction.Action);
            return(true);
        }
Ejemplo n.º 3
0
 public void VerifySignature(SignedAction signedAction, IPeer peer)
 {
     _cryptography.VerifySignature(signedAction, peer);
 }