Amazon.SimpleNotificationService.Util.Message.IsMessageSignatureValid C# (CSharp) Метод

IsMessageSignatureValid() публичный Метод

Verifies the authenticity of a message sent by Amazon SNS. This is done by computing a signature from the fields in the message and then comparing the signature to the signature provided as part of the message.
public IsMessageSignatureValid ( ) : bool
Результат bool
        public bool IsMessageSignatureValid()
        {
            var bytesToSign = GetMessageBytesToSign();

            var certificate = GetX509Certificate();
            var rsa = certificate.PublicKey.Key as RSACryptoServiceProvider;
            return rsa.VerifyData(bytesToSign, CryptoConfig.MapNameToOID("SHA1"), Convert.FromBase64String(this.Signature));
        }