public static final class ThreadNetworkCredentials.SecurityPolicy extends Object
The class represents Thread Security Policy.
Public Constructor Summary
SecurityPolicy(int rotationTimeHours, byte[] flags)
Creates a new
ThreadNetworkCredentials.SecurityPolicy object.
|
Public Method Summary
boolean | |
byte[] |
getFlags()
Returns 1 byte flags for Thread 1.1 or 2 bytes flags for Thread 1.2.
|
int |
getRotationTimeHours()
Returns the Security Policy Rotation Time in hours.
|
int |
hashCode()
|
String |
toString()
|
Inherited Method Summary
Public Constructors
public SecurityPolicy (int rotationTimeHours, byte[] flags)
Creates a new
ThreadNetworkCredentials.SecurityPolicy
object.
Parameters
rotationTimeHours | the value for Thread key rotation in hours. Must be in range of 0x1-0xffff. |
---|---|
flags | security policy flags with length of either 1 byte for Thread 1.1 or 2 bytes for Thread 1.2 or higher. |
Throws
IllegalArgumentException | if rotationTimeHours is not in range of 0x1-0xffff or length of
flags is smaller than
ThreadNetworkCredentials.LENGTH_MIN_SECURITY_POLICY_FLAGS . |
---|
Public Methods
public boolean equals (Object other)
public byte[] getFlags ()
Returns 1 byte flags for Thread 1.1 or 2 bytes flags for Thread 1.2.
public int getRotationTimeHours ()
Returns the Security Policy Rotation Time in hours.