Intel Security

Contents

The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.

https://github.com/AppSecurityApi/com-intel-security-cordova-plugin

Ionic Intel Security插件的安装(Installation)

ionic cordova plugin add com-intel-security-cordova-plugin npm install @ionic-native/intel-security

Ionic Intel Security插件支持的平台(Supported Platforms)

  • Android
  • iOS
  • Windows
  • Windows Phone 8

Ionic Intel Security插件的用法(Usage)

import { IntelSecurity } from '@ionic-native/intel-security';
...
constructor(private intelSecurity: IntelSecurity) { }
...

let storageID = 'id';

this.intelSecurity.data.createFromData({ data: 'Sample Data' })
  .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
  .catch((error: any) => console.log(error));

this.intelSecurity.storage.read({id: storageID })
  .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
  .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
  .catch((error: any) => console.log(error));

this.intelSecurity.storage.delete({ id: storageID })
  .then(() => console.log('Deleted Successfully'))
  .catch((error: any) => console.log(error));