Search
Sign In
Home
Recent
Media
Videos
Podcasts
Screencasts
Learn
Shows
Going Deep
ARCast.TV
InsideXbox
See All Shows...
Forums
Coffeehouse
Tech Off
Feedback
Sandbox
Key Topics
Visual Studio
Continuum
Identity
Interoperability
Azure
Windows
Wiki
Search
Subscribe
securitycodeexamples1
Cancel
Edit
[WikiEntry.PreviewButtonText]
Save
Code Examples Index
This page is a catalog of security code examples. Each example is a discreet block of code that includes the intentions and insight behind the code. The examples were drawn from a
code example candidate list
Authentication
*
Hash a Password Using a Random Salt (C)
*
Hash a Password Using a Random Salt (VB.NET)
Cookies
*
Setting application and ASP.NET 2.0 cookies securely (C)
*
Setting application and ASP.NET 2.0 cookies securely (VB.NET)
*
Encrypting and Signing a cookie for use by an external web application (C)
*
Encrypting and Signing a cookie for use by an external web application (VB.NET)
*
Decrypt validate encrypted signed cookie (C)
*
Decrypt validate encrypted signed cookie (VB.NET)
Cryptogrpahy
*
Generate RSA Keys and Store in the Registry Using DPAPI (C)
*
Generate RSA Keys and Store in the Registry Using DPAPI (VB.NET)
*
Generating Cryptographically Secure Random Numbers (C)
*
Generating Cryptographically Secure Random Numbers (VB.NET)
*
Decrypt a file via a block cipher using AES (C)
*
Decrypt a file via a block cipher using AES (VB.NET)
*
Decrypt a file via a block cipher using 3DES (C)
*
Decrypt a file via a block cipher using 3DES (VB.NET)
*
Decrypt a string via a block cipher using AES (C)
*
Decrypt a string via a block cipher using AES (VB.NET)
*
Decrypt a string via a block cipher using 3DES (C)
*
Decrypt a string via a block cipher using 3DES (VB.NET)
*
Encrypt a file via a block cipher using AES (C)
*
Encrypt a file via a block cipher using AES (VB.NET)
*
Encrypt a file via a block cipher using 3DES (C)
*
Encrypt a file via a block cipher using 3DES (VB.NET)
*
Export the Public Key from an RSA Key Pair for Distribution (C)
*
Export the Public Key from an RSA Key Pair for Distribution (VB.NET)
*
Creating and securely storing a symmetric encryption key and Initialization Vector (C)
*
Creating and securely storing a symmetric encryption key and Initialization Vector (VB.NET)
*
Generate a Message Authentication Code (C)
*
Generate a Message Authentication Code (VB.NET)
*
Generate an RSA signature of a given message (C)
*
Generate an RSA signature of a given message (VB.NET)
*
Import an RSA Public Key from a file and Encrypt a Message (C)
*
Import an RSA Public Key from a file and Encrypt a Message (VB.NET)
*
Retrieve an RSA Key Pair from the Registry and Decrypt a Message (C)
*
Retrieve an RSA Key Pair from the Registry and Decrypt a Message (VB.NET)
*
Generate an RSA signature of a given message (C)
*
Generate an RSA signature of a given message (VB.NET)
Data Access
*
Protect Credentials Within a Connection String in Code (C)
*
Protect Credentials Within a Connection String in Code (VB.NET)
*
Using Parameterized Queries for Secure Database Access (C)
*
Using Parameterized Queries for Secure Database Access (VB.NET)
*
Using Stored Procedures for Secure Database Access (C)
*
Using Stored Procedures for Secure Database Access (VB.NET)
I/O
*
Creating a temporary file which avoids canonicalization and race conditions (C)
*
Creating a temporary file which avoids canonicalization and race conditions (VB.NET)
*
Securely Executing a New Process from a .NET Application (C)
*
Securely Executing a New Process from a .NET Application (VB.NET)
Input and Data Validation
*
Encoding Output within a (C)
*
Encoding Output within a (VB.NET)
*
Validate User Input with Regular Expressions (C)
*
Validate User Input with Regular Expressions (VB.NET)
*
Scoping Data Retrieval from the Request Object (C)
*
Scoping Data Retrieval from the Request Object (VB.NET)
Registry
*
Protect Data in the Registry Using Key Permissions (C)
*
Protect Data in the Registry Using Key Permissions (VB.NET)
ViewState
*
Encrypting (C)
*
Encrypting (VB.NET)
Web Services
*
Perform XML schema validation of Web Service payload (C)
*
Perform XML schema validation of Web Service payload (VB.NET)
Cancel
Edit
[WikiEntry.PreviewButtonText]
Save
Delete
Edit
Comment on Post
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Comment on Post
Be the first to comment!
Reply
Reply to root
In reply to {0}
Start related discussion
Forum:
Site Feedback
Tech Off
The 9 Guy Around The World
The Coffeehouse
Subject:
Tags
*Loading available tags