New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mifare-classic

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mifare-classic

Read and write NDEF bytes to Mifare Classic NFC Tags

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

NDEF Mifare Classic

This module reads and writes NDEF bytes to Mifare Classic NFC tags. The module is a wrapper around libfreefare command line tools.

API

mifare.read(callback)

  • callback - function

Example

mifare.read(function (err, data, uid) {
  if (err) throw err;
  console.log('The NFC tag UID is', uid);
  var message = ndef.decodeMessage(data.toJSON());
  console.log(ndef.stringify(message));
});

The callback is passed two arguments (err, data), where data is the contents of the file

mifare.write(data, callback)

  • bytes - byte array of ndef data
  • callback - function

Example

mifare.write(bytes, function (err) {
  if (err) throw err;
  console.log("OK");
});

mifare.format(callback)

  • callback - function

Example

mifare.format(function (err) {
  if (err) throw err;
  console.log("OK");
});

Requires

  • libfreefare 14219ab1451f7c4e4da51acb6f8524924ec039e6 or newer
  • libnfc 1.7.0-rc7 or greater

Linux (Debian)

sudo apt-get install libfreefare* libnfc* -y

macOS

Use Homebrew

brew install libfreefare libnfc

Keywords

FAQs

Package last updated on 11 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc