C# Class Org.BouncyCastle.Crypto.Agreement.Srp.Srp6Utilities

Exibir arquivo Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
CalculateK ( IDigest digest, BigInteger N, BigInteger g ) : BigInteger
CalculateU ( IDigest digest, BigInteger N, BigInteger A, BigInteger B ) : BigInteger
CalculateX ( IDigest digest, BigInteger N, byte salt, byte identity, byte password ) : BigInteger
GeneratePrivateValue ( BigInteger N, SecureRandom random ) : BigInteger
ToPaddedArray ( this n, int length ) : byte[]

Gets the byte representation of n that is padded to match the byte length of length.

ValidatePublicValue ( BigInteger N, BigInteger val ) : BigInteger

Private Methods

Method Description
GetPadded ( BigInteger n, int length ) : byte[]

Pads a byte[] to the specified length, with zeroes at the start of the buffer.

HashPaddedPair ( IDigest digest, BigInteger N, BigInteger n1, BigInteger n2 ) : BigInteger

Pads n1 and n2 to the same number of bytes as N. Then hashes them.

Method Details

CalculateK() public static method

public static CalculateK ( IDigest digest, BigInteger N, BigInteger g ) : BigInteger
digest IDigest
N Org.BouncyCastle.Math.BigInteger
g Org.BouncyCastle.Math.BigInteger
return Org.BouncyCastle.Math.BigInteger

CalculateU() public static method

public static CalculateU ( IDigest digest, BigInteger N, BigInteger A, BigInteger B ) : BigInteger
digest IDigest
N Org.BouncyCastle.Math.BigInteger
A Org.BouncyCastle.Math.BigInteger
B Org.BouncyCastle.Math.BigInteger
return Org.BouncyCastle.Math.BigInteger

CalculateX() public static method

public static CalculateX ( IDigest digest, BigInteger N, byte salt, byte identity, byte password ) : BigInteger
digest IDigest
N Org.BouncyCastle.Math.BigInteger
salt byte
identity byte
password byte
return Org.BouncyCastle.Math.BigInteger

GeneratePrivateValue() public static method

public static GeneratePrivateValue ( BigInteger N, SecureRandom random ) : BigInteger
N Org.BouncyCastle.Math.BigInteger
random Org.BouncyCastle.Security.SecureRandom
return Org.BouncyCastle.Math.BigInteger

ToPaddedArray() public static method

Gets the byte representation of n that is padded to match the byte length of length.
public static ToPaddedArray ( this n, int length ) : byte[]
n this
length int
return byte[]

ValidatePublicValue() public static method

public static ValidatePublicValue ( BigInteger N, BigInteger val ) : BigInteger
N Org.BouncyCastle.Math.BigInteger
val Org.BouncyCastle.Math.BigInteger
return Org.BouncyCastle.Math.BigInteger