• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class FIPSCompliant

This class implements a number of methods that can be safely used in a FIPS-140 compliant environment.

Inheritance
System.Object
FIPSCompliant
Namespace: DotNetNuke.Security
Assembly: DotNetNuke.dll
Syntax
public class FIPSCompliant : object
Remarks

FIPS compliant Algorithms:

  • Hash algorithmsHMACSHA1MACTripleDESSHA1CryptoServiceProviderSHA256CryptoServiceProvider
  • Symmetric algorithms (use the same key for encryption and decryption)DESCryptoServiceProviderTripleDESCryptoServiceProvider
  • Asymmetric algorithms (use a public key for encryption and a private key for decryption)DSACryptoServiceProviderRSACryptoServiceProvider

Methods

| Improve this Doc View Source

DecryptAES(String, String, String, Int32)

uses the AES FIPS-140 compliant algorithm to encrypt a string.

Declaration
public static string DecryptAES(string encryptedText, string passPhrase, string salt, int iterations = 1000)
Parameters
Type Name Description
System.String encryptedText

the text to decrypt.

System.String passPhrase

the pass phase to do the decryption.

System.String salt

a salt value to ensure cipher text using the same text/password is different.

System.Int32 iterations

number of iterations to derive the key (higher is slower but more secure) - optional parameter with a default of 1000.

Returns
Type Description
System.String

The decrypted text.

Remarks

FIPS compliant Algorithms:

  • Hash algorithmsHMACSHA1MACTripleDESSHA1CryptoServiceProviderSHA256CryptoServiceProvider
  • Symmetric algorithms (use the same key for encryption and decryption)DESCryptoServiceProviderTripleDESCryptoServiceProvider
  • Asymmetric algorithms (use a public key for encryption and a private key for decryption)DSACryptoServiceProviderRSACryptoServiceProvider
| Improve this Doc View Source

EncryptAES(String, String, String, Int32)

uses the AES FIPS-140 compliant algorithm to encrypt a string.

Declaration
public static string EncryptAES(string plainText, string passPhrase, string salt, int iterations = 1000)
Parameters
Type Name Description
System.String plainText

the text to encrypt.

System.String passPhrase

the pass phase to do the encryption.

System.String salt

a salt value to ensure cipher text using the same text/password is different.

System.Int32 iterations

number of iterations to derive the key (higher is slower but more secure) - optional parameter with a default of 1000.

Returns
Type Description
System.String

The encrypted text.

Remarks

FIPS compliant Algorithms:

  • Hash algorithmsHMACSHA1MACTripleDESSHA1CryptoServiceProviderSHA256CryptoServiceProvider
  • Symmetric algorithms (use the same key for encryption and decryption)DESCryptoServiceProviderTripleDESCryptoServiceProvider
  • Asymmetric algorithms (use a public key for encryption and a private key for decryption)DSACryptoServiceProviderRSACryptoServiceProvider

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS