# xcross

> Provides the standard [Web Crypto API](https://www.w3.org/TR/WebCryptoAPI/) for NodeJS and Browser since both support it natively.

Latest version **0.1.3** (published 2023-10-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install xcross
pnpm add xcross
yarn add xcross
bun add xcross
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-10-05 |
| First published | 2022-04-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ivan Zakharchanka |
| Maintainers | 3axap4ehko |
| Keywords | crypto, hash, cross, isomorphic, hashing, hasher, cryptography, encryption, decryption, sign, verify, pairs, generate, digest, key, keys, sha1, sha256, sha384, sha512, hmac, aes, ecdh, pbkdf2, rsassa-pkcs1-v1.5, rsa, edrsa, browser, node |

## Links

- npm: https://www.npmjs.com/package/xcross
- Repository: https://github.com/3axap4eHko/subtlecrypto
- Homepage: https://github.com/3axap4eHko/subtlecrypto#readme
- Issues: https://github.com/3axap4eHko/subtlecrypto/issues
- Funding: https://github.com/sponsors/3axap4eHko
- npm.io page: https://npm.io/package/xcross

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2023-10-05
- 0.0.1-rc4 (beta) — 2022-04-29
- 0.1.2 — 2023-10-01
- 0.1.1 — 2023-09-25
- 0.1.0 — 2022-07-18
- 0.0.1 — 2022-05-01
- 0.0.1-rc3 — 2022-04-29
- 0.0.1-rc2 — 2022-04-29
- 0.0.1-rc1 — 2022-04-29

## README

# X-Cross

Provides the standard [Web Crypto API](https://www.w3.org/TR/WebCryptoAPI/) for NodeJS and Browser since both support it natively.

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]

## Example

```typescript
import { subtle } from 'xcross';

const sha256 = async (input: string) => {
  const encoder = new TextEncoder();
  const data = encoder.encode(input);
  const hashBuffer = await subtle.digest('SHA-256', data);
  const hashArray = new Uint32Array(hashBuffer);

  return hashArray.map((b) => b.toString(16).padStart(int32.BYTES_PER_ELEMENT * 2, '0')).join('');
};
```

## License

License [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Copyright (c) 2023-present Ivan Zakharchanka


[npm-url]: https://www.npmjs.com/package/xcross
[downloads-image]: https://img.shields.io/npm/dw/xcross.svg?maxAge=43200
[npm-image]: https://img.shields.io/npm/v/xcross.svg?maxAge=43200

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