C# 클래스 Cryptid.CandidateDelegate

Handles all CandidateDelegate; Basically, any action you need to perform on a Candidate should be done here.
파일 보기 프로젝트 열기: CryptidID/Cryptid

공개 메소드들

메소드 설명
EnrollCandidate ( Candidate c, string password, RSAParameters privKey ) : byte[]

Enroll a candidate a to Factom. A new chain is created and the candidate data is packed and split into entries for that chain. This operation is irreversable.

FullVerifyFromChain ( byte chainId, string password, SourceAFIS.Simple.Fingerprint fp, RSAParameters publicKey ) : float

Fully verify a user from a chain. Full verify includes fingerprint, password and signature check

GenerateExtIDs ( byte packedCandidate ) : byte[][]

Generates the ExtIDs for a packed candidate

GetCandidateChainHistory ( byte chainId, RSAParameters pubKey ) : List

Get all the chains used by a candidate (Follows OldVersionRecords and UpdatedRecords)

GetCandidateUpdatedRecords ( byte chainId, RSAParameters pubKey ) : List

Get all Candidate update records in a chain

GetOldVersionRecords ( byte chainId, RSAParameters pubKey ) : List

GetPackedCandidate ( byte chainId ) : byte[]

Gets the candidates packed bytes from the specified chain

Pack ( Candidate c, string password, RSAParameters privKey ) : byte[]

Pack a candidate object into storable data

Unpack ( byte packed, string password, RSAParameters pubKey ) : Candidate

Unpack a candidate object from storable data

UpdateCandidate ( Candidate newCandidate, string password, SourceAFIS.Simple.Fingerprint fp, RSAParameters privKey, byte chainToUpdate ) : byte[]

- Verifies that we are allowed to update this chain - Enrolls a new candidate chain with a CandidateOldVersionRecord referencing the old chain - Adds a OldVersionRecord to the old chain referencing the new chain - Adds a ChainUpdateRecord to the chain requesting update, forwarding it to the new chain. This operation is irreversable.

VerifyFingerprint ( Candidate c, SourceAFIS.Simple.Fingerprint fp ) : float

Verify a candidates fingerprint

VerifySignature ( byte packed, RSAParameters pubKey ) : bool

Verify the signature of packed candidate data

메소드 상세

EnrollCandidate() 공개 정적인 메소드

Enroll a candidate a to Factom. A new chain is created and the candidate data is packed and split into entries for that chain. This operation is irreversable.
public static EnrollCandidate ( Candidate c, string password, RSAParameters privKey ) : byte[]
c Candidate The candidate to enroll
password string The password provided by the candidate
privKey System.Security.Cryptography.RSAParameters The private key to pack the data with
리턴 byte[]

FullVerifyFromChain() 공개 정적인 메소드

Fully verify a user from a chain. Full verify includes fingerprint, password and signature check
public static FullVerifyFromChain ( byte chainId, string password, SourceAFIS.Simple.Fingerprint fp, RSAParameters publicKey ) : float
chainId byte The id of the chain to verify
password string The candidates password
fp SourceAFIS.Simple.Fingerprint The candidates fingerprint
publicKey System.Security.Cryptography.RSAParameters The public key to verify the data with
리턴 float

GenerateExtIDs() 공개 정적인 메소드

Generates the ExtIDs for a packed candidate
public static GenerateExtIDs ( byte packedCandidate ) : byte[][]
packedCandidate byte The packed candidate to generate for
리턴 byte[][]

GetCandidateChainHistory() 공개 정적인 메소드

Get all the chains used by a candidate (Follows OldVersionRecords and UpdatedRecords)
public static GetCandidateChainHistory ( byte chainId, RSAParameters pubKey ) : List
chainId byte The id of a chain owned by the candidate
pubKey System.Security.Cryptography.RSAParameters The public key to verify the data with
리턴 List

GetCandidateUpdatedRecords() 공개 정적인 메소드

Get all Candidate update records in a chain
public static GetCandidateUpdatedRecords ( byte chainId, RSAParameters pubKey ) : List
chainId byte
pubKey System.Security.Cryptography.RSAParameters The public key to verify the data with
리턴 List

GetOldVersionRecords() 공개 정적인 메소드

public static GetOldVersionRecords ( byte chainId, RSAParameters pubKey ) : List
chainId byte
pubKey System.Security.Cryptography.RSAParameters The public key to verify the data with
리턴 List

GetPackedCandidate() 공개 정적인 메소드

Gets the candidates packed bytes from the specified chain
public static GetPackedCandidate ( byte chainId ) : byte[]
chainId byte The id of the chain to get the candidate data from
리턴 byte[]

Pack() 공개 정적인 메소드

Pack a candidate object into storable data
public static Pack ( Candidate c, string password, RSAParameters privKey ) : byte[]
c Candidate The candidate object to pack
password string The password provided by the candidate
privKey System.Security.Cryptography.RSAParameters The private key to sign the data with
리턴 byte[]

Unpack() 공개 정적인 메소드

Unpack a candidate object from storable data
public static Unpack ( byte packed, string password, RSAParameters pubKey ) : Candidate
packed byte The packed candidate data
password string The password provided by the candidate
pubKey System.Security.Cryptography.RSAParameters The public key to verify the data with
리턴 Candidate

UpdateCandidate() 공개 정적인 메소드

- Verifies that we are allowed to update this chain - Enrolls a new candidate chain with a CandidateOldVersionRecord referencing the old chain - Adds a OldVersionRecord to the old chain referencing the new chain - Adds a ChainUpdateRecord to the chain requesting update, forwarding it to the new chain. This operation is irreversable.
public static UpdateCandidate ( Candidate newCandidate, string password, SourceAFIS.Simple.Fingerprint fp, RSAParameters privKey, byte chainToUpdate ) : byte[]
newCandidate Candidate The updated candidate information
password string The password provided by the candidate
fp SourceAFIS.Simple.Fingerprint The fingerprint to verify against
privKey System.Security.Cryptography.RSAParameters The private key to pack the data with
chainToUpdate byte The chain ID of the chain to be updated
리턴 byte[]

VerifyFingerprint() 공개 정적인 메소드

Verify a candidates fingerprint
public static VerifyFingerprint ( Candidate c, SourceAFIS.Simple.Fingerprint fp ) : float
c Candidate The candidate to compare against
fp SourceAFIS.Simple.Fingerprint The provided fingerprint
리턴 float

VerifySignature() 공개 정적인 메소드

Verify the signature of packed candidate data
public static VerifySignature ( byte packed, RSAParameters pubKey ) : bool
packed byte The packed candidate data
pubKey System.Security.Cryptography.RSAParameters The public key to verify with
리턴 bool