Serializable
, Comparable<Identifier>
, net.minidev.json.JSONAware
@Immutable public final class DeviceCode extends Identifier
Related specifications:
DEFAULT_BYTE_LENGTH, secureRandom
Constructor | Description |
---|---|
DeviceCode() |
Creates a new device code with a randomly generated 256-bit (32-byte)
value, Base64URL-encoded.
|
DeviceCode(int byteLength) |
Creates a new device code with a randomly generated value of the
specified byte length, Base64URL-encoded.
|
DeviceCode(String value) |
Creates a new device code with the specified value.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object object) |
compareTo, getValue, hashCode, toJSONString, toString
public DeviceCode(String value)
value
- The code value. Must not be null
or empty
string.public DeviceCode(int byteLength)
byteLength
- The byte length of the value to generate. Must be
greater than one.public DeviceCode()
public boolean equals(Object object)
equals
in class Identifier
Copyright © 2019 Connect2id Ltd.. All rights reserved.