# crypto-object

> Encrypt objects in Node.js

Latest version **1.0.0** (published 2017-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install crypto-object
pnpm add crypto-object
yarn add crypto-object
bun add crypto-object
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-06-14 |
| First published | 2017-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | @Euthor |
| Maintainers | nicholaswmin |
| Keywords | encryption, objects, node |

## Links

- npm: https://www.npmjs.com/package/crypto-object
- Repository: https://github.com/Euthor/crypto-object
- Homepage: https://github.com/Euthor/crypto-object#readme
- Issues: https://github.com/Euthor/crypto-object/issues
- npm.io page: https://npm.io/package/crypto-object

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-06-14

## README

# crypto-object
> Encrypt Objects in Node.js, using built-in [Crypto][1].
> Uses AES 256(CTR mode)

[![Build Status](https://travis-ci.org/Euthor/crypto-object.svg?branch=master)](https://travis-ci.org/Euthor/crypto-object)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)

## Usage

```bash
$ npm i --save https://github.com/Euthor/crypto-object.git
```

```javascript
const CryptoObject = require('crypto-object');

const cryptoObject = new CryptoObject({
  password: 'monica', // The encryption password - Required
  keys: ['foo', 'bar'] // Which object keys to encrypt - Required
});

cryptoObject.encrypt({foo: 'hello', bar: 'world', id: 'x-001'})
// `{ foo: '1a29e0e604', bar: '0523fee60f', id: 'x-001' }`

cryptoObject.decrypt({ foo: '1a29e0e604', bar: '0523fee60f', id: 'x-001' })
// `{ foo: 'hello', bar: 'world', id: 'x-001' }`
```

## Run the tests

```bash
$ npm install -g mocha
$ npm test
```

## Contributing?

```bash
# Always run the linter & fix code style before pushing
$ npm run lint
```

## Authors

- Nicholas Kyriakides, [@nicholaswmin][2]

## Owners

- [Euthor][3]

## License

> The MIT License

[1]: https://nodejs.org/api/crypto.html
[2]: https://github.com/nicholaswmin
[3]: https://github.com/Euthor

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