Class HomekitSRP6Routines
- java.lang.Object
-
- io.github.hapjava.server.impl.pairing.HomekitSRP6Routines
-
public class HomekitSRP6Routines extends Object
This class is modified from the nimbus SRP library to provide methods that are compatible with some pecularities of HomeKit. Namely, the need for a 3072 bit private value- Author:
- Vladimir Dzhuvinov
-
-
Constructor Summary
Constructors Constructor Description HomekitSRP6Routines()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static BigIntegercreateRandomBigIntegerInRange(BigInteger min, BigInteger max, SecureRandom random)Returns a random big integer in the specified range [min, max].static BigIntegergeneratePrivateValue(BigInteger N, SecureRandom random)
-
-
-
Method Detail
-
generatePrivateValue
public static BigInteger generatePrivateValue(BigInteger N, SecureRandom random)
-
createRandomBigIntegerInRange
protected static BigInteger createRandomBigIntegerInRange(BigInteger min, BigInteger max, SecureRandom random)
Returns a random big integer in the specified range [min, max].- Parameters:
min- The least value that may be generated. Must not benull.max- The greatest value that may be generated. Must not benull.random- Source of randomness. Must not benull.- Returns:
- A random big integer in the range [min, max].
-
-