Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Users Namespace / UserPasswordHelper Class / EncodePassword Method
Password value to be encoded. Must not be null or empty.
Specifies the format to use for encoding password. Allowed values are: "CLEAR", "MD5", "SHA1", "SHA256", "SHA384", and "SHA512", "AES", "3DES". This value is case-insensitive.
In This Topic
    EncodePassword Method
    In This Topic
    Encodes a password into the format specified.
    Syntax
    public static string EncodePassword( 
       string password,
       string passwordFormat
    )

    Parameters

    password
    Password value to be encoded. Must not be null or empty.
    passwordFormat
    Specifies the format to use for encoding password. Allowed values are: "CLEAR", "MD5", "SHA1", "SHA256", "SHA384", and "SHA512", "AES", "3DES". This value is case-insensitive.

    Return Value

    When format is "CLEAR", the original value of password is returned. Otherwise returns the encoded password value formatted as a base64-encoded string.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also