C# Class Miracle.FileZilla.Api.User

Class representing a FileZilla user
Inheritance: Group
Afficher le fichier Open project: PolarbearDK/Miracle.FileZilla.Api

Méthodes publiques

Méthode Description
AssignPassword ( string password, int protocolVersion ) : void

Assign a new password to the user. If protocolVersion requires it, also generate a salt.

Deserialize ( BinaryReader reader, int protocolVersion, int index ) : void

Deserialise FileZilla binary data into object

HashPasswordMd5 ( string password ) : string

Compute a correctly formatted hashed password for use in User.Password.

HashPasswordSha512 ( string password, string salt ) : string

Compute a correctly formatted hashed password for use in User.Password.

Serialize ( BinaryWriter writer, int protocolVersion, int index ) : void

Serialise object into FileZilla binary data

User ( ) : System

Default constructor (sets defaults as in FileZilla server interface)

Private Methods

Méthode Description
GenerateSalt ( ) : string

Method Details

AssignPassword() public méthode

Assign a new password to the user. If protocolVersion requires it, also generate a salt.
public AssignPassword ( string password, int protocolVersion ) : void
password string New passwordinary writer to write data to
protocolVersion int Current FileZilla protocol version
Résultat void

Deserialize() public méthode

Deserialise FileZilla binary data into object
public Deserialize ( BinaryReader reader, int protocolVersion, int index ) : void
reader System.IO.BinaryReader Binary reader to read data from
protocolVersion int Current FileZilla protocol version
index int The 0 based index of this item in relation to any parent list
Résultat void

HashPasswordMd5() public static méthode

Compute a correctly formatted hashed password for use in User.Password.
public static HashPasswordMd5 ( string password ) : string
password string
Résultat string

HashPasswordSha512() public static méthode

Compute a correctly formatted hashed password for use in User.Password.
public static HashPasswordSha512 ( string password, string salt ) : string
password string
salt string
Résultat string

Serialize() public méthode

Serialise object into FileZilla binary data
public Serialize ( BinaryWriter writer, int protocolVersion, int index ) : void
writer System.IO.BinaryWriter Binary writer to write data to
protocolVersion int Current FileZilla protocol version
index int The 0 based index of this item in relation to any parent list
Résultat void

User() public méthode

Default constructor (sets defaults as in FileZilla server interface)
public User ( ) : System
Résultat System