protected virtual byte[] PKCSUnpad(byte[] data) { Padding = (PKCSPadding)data[0]; int position = 0; while (data[position++] != 0) { ; } var buffer = new byte[data.Length - position]; Buffer.BlockCopy(data, position, buffer, 0, buffer.Length); return(buffer); }
protected virtual byte[] PKCSUnpad(byte[] data) { Padding = (PKCSPadding)data[0]; int position = 0; while (data[position++] != 0) ; var buffer = new byte[data.Length - position]; Buffer.BlockCopy(data, position, buffer, 0, buffer.Length); return buffer; }