Skip navigation.

Online tool to create keys for view state validation and encryption

<machineKey> Generator

This tool allows you to generate random keys for valdiation and ecnryption/decryption of the view state. It builds a <machineKey> element which you need to include in your web.config file.

The validation key should be in the range of 20 to 64. Decryption key—8 or 24. Between SHA1 and MD5 algorithms used for validation SHA1 produces a longer key and is therefore recommended. The tool creates an 8-byte key for the Data Encryption Algorythm (DES) and a 24-byte one for Triple-DES (3DES).

Once keys are generated they are converted into a string of hexadecimal characters.

Validation key length:
Encryption key length:
Type:
 
Paste the following text in your web.config: