Opc.Ua.Bindings.TcpChannel.Verify C# (CSharp) Метод

Verify() защищенный Метод

Verifies an asymmetric signature at the end of the buffer.
Start and count specify the block of data including the signature and padding. The current security policy uri and sender certificate specify the size of the signature. This call also verifies that the padding is correct.
protected Verify ( ArraySegment dataToVerify, byte signature, X509Certificate2 senderCertificate ) : bool
dataToVerify ArraySegment
signature byte
senderCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
Результат bool
        protected bool Verify(
            ArraySegment<byte> dataToVerify,
            byte[]             signature,
            X509Certificate2   senderCertificate)
        {       
            // verify signature.
            switch (SecurityPolicyUri)
            {
                case SecurityPolicies.None:
                {
                    return true;
                }

                case SecurityPolicies.Basic128Rsa15:
                case SecurityPolicies.Basic256:
                {
                    return RsaPkcs15_Verify(dataToVerify, signature, senderCertificate, HashAlgorithmName.SHA1);
                }

                case SecurityPolicies.Basic256Sha256:
                {
                    return RsaPkcs15_Verify(dataToVerify, signature, senderCertificate, HashAlgorithmName.SHA256);
                }

                default:
                {
                    return false;
                }
            }
        }

Same methods

TcpChannel::Verify ( TcpChannelToken token, byte signature, ArraySegment dataToVerify, bool useClientKeys ) : bool