Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2003, 10:14 AM
Registered User
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# Data Security: PKCS7 Padding is invalid

I'm using the EncryptionTest.cs example on page 64 of the C# Data Security Handbook, which makes use of the Rijndael Managed security provider.

The example as written works fine, but I want to verify that decrypting with an invalid key produces non-intelligible plain text.

If I change the value of the exiting key (which was automatically generated) and then execute my code I get a CryptographicException of "PKCS7 padding is invalid and cannot be removed."

What is the reason for this and how can I get decrypted plain text to use in my applications without exceptions being thrown from invalid keys?





Similar Threads
Thread Thread Starter Forum Replies Last Post
invalid data string or buffer length?? dlacloche Classic ASP Basics 1 July 21st, 2008 03:40 PM
I can not download c# data security handbook fineboy C# 0 August 16th, 2006 04:43 AM
Security Context Invalid lualar VB Components 0 August 31st, 2004 06:32 PM
data base security question TnTandyO Classic ASP Databases 9 February 13th, 2004 02:11 PM
Invalid operator for data type...... Adam H-W SQL Server 2000 3 January 28th, 2004 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.