Org.BouncyCastle.Crypto.Paddings.ISO10126d2Padding.PadCount C# (CSharp) Method

PadCount() public method

public PadCount ( byte input ) : int
input byte
return int
        public int PadCount(byte[] input)
            //throws InvalidCipherTextException
        {
            int count = input[input.Length - 1] & 0xff;

            if (count > input.Length)
            {
                throw new InvalidCipherTextException("pad block corrupted");
            }

            return count;
        }
    }