Package org.nfctools.mf.tlv

Examples of org.nfctools.mf.tlv.LockControlTlv


public class MemoyLayoutTest {

  @Test
  public void testLockControlTlv() throws Exception {
    LockControlTlv lockControlTlv = MemoryLayout.ULTRALIGHT_C.createLockControlTlv();
    assertArrayEquals(new byte[] { (byte)0xA0, 0x10, 0x44 }, lockControlTlv.toBytes());
  }
View Full Code Here


    return dynamicLockBytes;
  }

  public LockControlTlv createLockControlTlv() {
    if (hasDynamicLockBytes()) {
      LockControlTlv tlv = new LockControlTlv();
      tlv.setPageAddress(10);
      tlv.setByteOffset(0);
      tlv.setSize(16);
      tlv.setBytesPerPage(bytesPerPage);
      tlv.setBytesLockedPerLockBit(4);
      return tlv;
    }
    else {
      return null;
    }
View Full Code Here

TOP

Related Classes of org.nfctools.mf.tlv.LockControlTlv

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.