28import org.jau.util.BasicTypes;
66 public static PropertyType get(
final String name)
throws IllegalArgumentException {
77 case (
byte) 0x01:
return RESPONDER;
78 case (
byte) 0x02:
return AUTH;
106 final StringBuilder out =
new StringBuilder();
111 if( 0 < count ) { out.append(
", "); }
114 return "["+out.toString()+
"]";
152 public void get(
final byte[] source,
int pos) {
153 if(
byte_size > ( source.length - pos ) ) {
154 throw new IllegalArgumentException(
"Stream ( "+source.length+
" - "+pos+
" ) < "+
byte_size+
" bytes");
157 System.arraycopy(source, pos,
csrk, 0, 16); pos+=16;
171 public final void put(
final byte[] sink,
int pos) {
172 if(
byte_size > ( sink.length - pos ) ) {
173 throw new IllegalArgumentException(
"Stream ( "+sink.length+
" - "+pos+
" ) < "+
byte_size+
" bytes");
176 System.arraycopy(
csrk, 0, sink, pos, 16); pos+=16;
184 ", csrk "+BasicTypes.bytesHexString(
csrk, 0, -1,
true )+
SMPSignatureResolvingKey PropertyType Bit Mask
byte mask
The PropertyType bit mask.
boolean isSet(final PropertyType bit)
SMP Signature Resolving Key, used for platform agnostic persistence.
final void put(final byte[] sink, int pos)
Method transfers all bytes representing this instance into the given destination array at the given p...
final boolean isResponder()
static final int byte_size
Size of the byte stream representation in bytes.
Properties properties
Properties bit mask.
SMPSignatureResolvingKey()
Construct emoty unset instance.
byte csrk[]
Connection Signature Resolving Key (CSRK)
SMPSignatureResolvingKey(final byte source[], final int pos)
Construct instance via given source byte array.
SMPSignatureResolvingKey Property Bits
PropertyType(final byte v)
NONE
No specific property.
RESPONDER
Responder Key (LL slave).