Beispiel #1
0
        public bool Verify(IPacket packet)
        {
            if (!(packet is UtxoSignedPacketBase packetBase))
            {
                throw new ArgumentOutOfRangeException(nameof(packet), string.Format(Resources.ERR_WRONG_PACKET_BASE_TYPE, nameof(UtxoSigningService), typeof(UtxoSignedPacketBase).FullName));
            }

            byte[]          msg        = packetBase.BodyBytes.ToArray();
            byte[]          keyImage   = packetBase.KeyImage.Value.ToArray();
            IKey[]          publicKeys = packetBase.PublicKeys;
            RingSignature[] signatures = packetBase.Signatures;

            return(ConfidentialAssetsHelper.VerifyRingSignature(msg, keyImage, publicKeys.Select(p => p.Value.ToArray()).ToArray(), signatures));
        }