# nativescript-sha

> Nativescript SHA (HMAC-SHA) plugin.

Latest version **1.0.4** (published 2020-04-16) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install nativescript-sha
pnpm add nativescript-sha
yarn add nativescript-sha
bun add nativescript-sha
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-04-16 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Paul McGougan |
| Maintainers | gallandro |
| Keywords | NativeScript, TypeScript, JavaScript, Android, iOS, SHA256, HMAC |

## Links

- npm: https://www.npmjs.com/package/nativescript-sha
- Repository: https://github.com/mcgouganp/nativescript-sha
- Issues: https://github.com/mcgouganp/nativescript-sha/issues
- npm.io page: https://npm.io/package/nativescript-sha

## Recent versions

- 1.0.4 (latest) — 2020-04-16
- 1.0.3 — 2019-11-23
- 1.0.2 — 2019-11-16
- 1.0.1 — 2019-06-09
- 1.0.0 — 2019-05-28

## README

# Nativescript-SHA ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png)

[![npm](https://img.shields.io/npm/v/nativescript-sha.svg)](https://www.npmjs.com/package/nativescript-sha)
[![npm](https://img.shields.io/npm/dm/nativescript-sha.svg)](https://www.npmjs.com/package/nativescript-sha)
[![Build Status](https://travis-ci.org/mcgouganp/nativescript-sha.svg?branch=master)](https://travis-ci.org/mcgouganp/nativescript-sha)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6D28NSTFXMQKQ)

This plugin gives access to native SHA generation code on iOS and Android.

Supports SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512.

Also support HMAC for all supported SHA hashes.

## Prerequisites / Requirements

None.

## Installation

To install, simply run:

```bash
tns plugin add nativescript-sha
```

## Usage

```typescript
import { Sha256, HmacSha256 } from 'nativescript-sha';

console.log(`Hash is ${Sha256("this is our test data")}`);

console.log(`Hmac is ${HmacSha256("secretkey", "this is our test data")}`);
```

## Donation
If this project helped you reduce your development time, you could consider helping me with a cup of coffee or some electricity :)

[![Donate](https://www.paypalobjects.com/en_AU/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6D28NSTFXMQKQ)

## License

Apache License Version 2.0, January 2004

---
_Source: https://npm.io/package/nativescript-sha · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
