Code Monkey home page Code Monkey logo

cordova-plugin-signature-fingerprint's Introduction

Cordova Signature Fingerprint Plugin

Get the fingerprint signature of your app's certificate and its package name.

Especially useful for adding yet another layer of security in your API calls.

Installation

With cordova-cli

If you are using cordova-cli, install with:

$ cordova plugin add cordova-plugin-signature-fingerprint

With plugman

With a plain plugman, you should be able to install with something like:

$ plugman --platform <android> --project <directory> --plugin https://github.com/fontesoft/cordova-plugin-signature-fingerprint.git

With Ionic 2/3

Use TypeScript wrapper Signature Fingerprint: https://www.npmjs.com/package/@fontesoft/signature-fingerprint

Supported Platforms

  • Android

Methods

  • cordova.getSignatureFingerprint.getSignature
  • cordova.getSignatureFingerprint.getPackageName

cordova.getSignatureFingerprint.getSignature

Return SHA1 Fingerprint of the app certificate

cordova.getSignatureFingerprint.getSignature(successCallback, [errorCallback]);

Parameters

  • successCallback: The callback that is passed fingerprint
  • errorCallback: (Optional) The callback that executes if an error occurs.

Example

    // successCallback
    var onSuccess = function(sha1) {
      alert("SHA1: " + sha1);
    }

    // errorCallback
    var onError = function(error) {
      alert("ERROR: " + error);
    }

    cordova.getSignatureFingerprint.getSignature(onSuccess, onError);

cordova.getSignatureFingerprint.getPackageName

Returns the package name of the app

cordova.getSignatureFingerprint.getPackageName(successCallback, [errorCallback]);

Parameters

  • successCallback: The callback that is passed fingerprint
  • errorCallback: (Optional) The callback that executes if an error occurs.

Example

    // successCallback
    var onSuccess = function(name) {
      alert("Package Name: " + name);
    }

    // errorCallback
    var onError = function(error) {
      alert("ERROR: " + error);
    }

    cordova.getSignatureFingerprint.getPackageName(onSuccess, onError);

License

The Cordova Signature Fingerprint Plugin is open-sourced software licensed under the MIT license.

cordova-plugin-signature-fingerprint's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.