예제 #1
0
        /// <summary>
        ///     Determines whether this instance is encrypted.
        /// </summary>
        /// <returns>
        ///     <c>Encrypted</c> if this instance is encrypted; otherwise, <c>Unencrypted</c>.
        /// </returns>
        public EncryptionType IsEncrypted()
        {
            var sourcePixelColor = PixelUtilities.GetPixelBgra8(this.sourcePicture.Pixels, ImageConstants.FirstX,
                                                                ImageConstants.SecondX,
                                                                this.sourcePicture.Width,
                                                                this.sourcePicture.Height);

            return(HeaderManager.CheckForEncryption(sourcePixelColor));
        }
예제 #2
0
        private void checkForEncryption()
        {
            var sourcePixelColor = PixelUtilities.GetPixelBgra8(this.sourcePicture.Pixels, ImageConstants.FirstX,
                                                                ImageConstants.SecondX, this.sourcePicture.Width,
                                                                this.sourcePicture.Height);

            if (HeaderManager.CheckForEncryption(sourcePixelColor) == EncryptionType.Encrypted)
            {
                this.isEncrypted = true;
            }
            else
            {
                this.isEncrypted = false;
            }
        }