Show / Hide Table of Contents

Class ManagePassword

This class is useful for hashing password data. In process, it wil check password if it is first or changed. Then it will be hashed password.Else it will get password from DB. Finally it will return password data for updating or inserting.

Inheritance
System.Object
ManagePassword
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SDBCS.management
Assembly: SDBCS.dll
Syntax
public class ManagePassword
Remarks

Author Mehmet Hayati KINAŞ

Version 1.0

Constructors

ManagePassword(String, PasswordBean, String)

The constructor sets defPasw, algorithm, passwordBean, defMask for hashing password. Defaultly, algorithm is SHAConverter.SHA_256 and charset is SHAConverter.UTF_8.

Declaration
public ManagePassword(string defPasw, PasswordBean passwordBean, string defMask)
Parameters
Type Name Description
System.String defPasw

Default password string value.

PasswordBean passwordBean

PasswordBean instance for recording/retrieving password to/from DB.

System.String defMask

Default mask string value.

Properties

algorithm

Declaration
public int algorithm { get; set; }
Property Value
Type Description
System.Int32

charset

Declaration
public int charset { get; set; }
Property Value
Type Description
System.Int32

Methods

getErrorString()

For getting errorString

Declaration
public string getErrorString()
Returns
Type Description
System.String

errorString

getPaswDataFB()

Get password string for debugging purpose.

Declaration
public string getPaswDataFB()
Returns
Type Description
System.String

paswDataFB

getPaswDataFP()

Get password string for debugging purpose.

Declaration
public string getPaswDataFP()
Returns
Type Description
System.String

paswDataFP

getPaswDataTN()

Get password string for debugging purpose.

Declaration
public string getPaswDataTN()
Returns
Type Description
System.String

paswDataTN

hashPasw(String, String, Boolean)

This method hash paswData and return as a string.

Declaration
public string hashPasw(string keyData, string paswData, bool isInsert)
Parameters
Type Name Description
System.String keyData

Key data string value.

System.String paswData

Pasword data string value.

System.Boolean isInsert

If action is insert set it true, else set false.

Returns
Type Description
System.String

Hashed paswData string value.

In This Article
Back to top Generated by DocFX