C# Class GSF.Security.Authentication.SrpUserCredential

An individual server side user credential
Show file Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Properties

Property Type Description
Iterations int
Salt byte[]
ServerEncryptionkey byte[]
ServerHMACKey byte[]
ServerKeyName System.Guid
SrpStrength SrpStrength
UserName string
UsernameBytes byte[]
Verification byte[]
VerificationInteger Org.BouncyCastle.Math.BigInteger

Public Methods

Method Description
Load ( ) : void
Save ( ) : void
SrpUserCredential ( string username, byte verification, byte salt, int iterations, SrpStrength srpStrength ) : System

Creates user credentials

SrpUserCredential ( string username, string password, SrpStrength strength = SrpStrength.Bits1024, int saltSize = 32, int iterations = 4000 ) : System

Creates a user credential from the provided data.

Method Details

Load() public method

public Load ( ) : void
return void

Save() public method

public Save ( ) : void
return void

SrpUserCredential() public method

Creates user credentials
public SrpUserCredential ( string username, byte verification, byte salt, int iterations, SrpStrength srpStrength ) : System
username string
verification byte
salt byte
iterations int
srpStrength SrpStrength
return System

SrpUserCredential() public method

Creates a user credential from the provided data.
public SrpUserCredential ( string username, string password, SrpStrength strength = SrpStrength.Bits1024, int saltSize = 32, int iterations = 4000 ) : System
username string
password string
strength SrpStrength
saltSize int
iterations int
return System

Property Details

Iterations public property

The number of SHA512 iterations using PBKDF2
public int Iterations
return int

Salt public property

The salt used to compute the password bytes (x)
public byte[] Salt
return byte[]

ServerEncryptionkey public property

Session Resume Encryption Key
public byte[] ServerEncryptionkey
return byte[]

ServerHMACKey public property

Session Resume HMAC key
public byte[] ServerHMACKey
return byte[]

ServerKeyName public property

Session Resume Key Name
public Guid,System ServerKeyName
return System.Guid

SrpStrength public property

The bit strength of the SRP algorithm.
public SrpStrength SrpStrength
return SrpStrength

UserName public property

The normalized name of the user
public string UserName
return string

UsernameBytes public property

public byte[] UsernameBytes
return byte[]

Verification public property

The Srp server verification bytes. (Computed as g^x % N)
public byte[] Verification
return byte[]

VerificationInteger public property

Verification as a BigInteger.
public BigInteger,Org.BouncyCastle.Math VerificationInteger
return Org.BouncyCastle.Math.BigInteger