{"_id":"simplecrypt","_rev":"7-33e86e1378e4c0071aabe6a666fe43db","name":"simplecrypt","description":"Simple library for encrypting/decrypting strings without the boilerplate of the crypt library.","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.2":{"name":"simplecrypt","version":"0.0.2","description":"Very basic library for encrypting/decrypting strings without the boilerplate of the crypt library.","main":"lib/simplecrypt.js","directories":{"example":"examples","test":"tests"},"scripts":{"test":"mocha tests"},"repository":{"type":"git","url":"https://github.com/ShowClix/simplecrypt"},"keywords":["encryption","crypt","strings","cipher"],"author":{"name":"me@nategood.com"},"license":"MIT","bugs":{"url":"https://github.com/ShowClix/simplecrypt/issues"},"readme":"# simplecrypt\n\nSimplecrypt is intended to be a very basic, concise library for doing\none thing: encrypting strings.  By default, it makes a lot of assumptions\nfor you, like what type of encryption to use (AES 192), what to use for\nthe key (cryptographically strong random data), how large to make the\nkey (256 bytes), the encoding to use (hex dump for ciphered, UTF-8 for\ndeciphered).  Some of these you can change (the encryption type, and the\nkey), but the focus here is simplicity.\n\nImportant note: if you do not specify the key, a random one is generated.\nIf you plan on storing the encrypted digest somewhere, then you will need\nto specify a key or retrieve the key from the simplecrypt instance.\n\n## Installation\n\n```\nnpm install simplecrypt\n```\n\n## Usage\n\n```javascript\nvar simplecrypt = require(\"simplecrypt\");\n\nvar sc = simplecrypt();\n\nvar digest = sc.encrypt(\"my secret\");\nconsole.log(digest); // \"66cea6eb1c18b8862485cf0604fa6062\"\n\nvar message = sc.decrypt(digest);\nconsole.log(message); // \"my secret\"\n```\n","readmeFilename":"README.md","_id":"simplecrypt@0.0.2","dist":{"shasum":"08f65c517e47370659c3d7de4283b7e97598b72f","tarball":"https://registry.npmjs.org/simplecrypt/-/simplecrypt-0.0.2.tgz","integrity":"sha512-aE5GlHRXOG1MqKjM4IEDBlXe/8bRQqEEG5AL8AUaRdQH5qWhJgTHo3tjfQcp0Rhu9wS/FnqtoM3ydhnECxlMLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeVWU173KPOXSFoVaSxqshbOW0SENqYZbSm+9MGxQ38gIhALzrBdIJGzorfCW8GGtaL+k/WF91MlNLazvA/pVPVyK2"}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"nategood","email":"me@nategood.com"},"maintainers":[{"name":"nategood","email":"me@nategood.com"}]},"0.1.0":{"name":"simplecrypt","version":"0.1.0","description":"Simple library for encrypting/decrypting strings without the boilerplate of the crypt library.","main":"lib/simplecrypt.js","directories":{"example":"examples","test":"tests"},"scripts":{"test":"mocha tests"},"repository":{"type":"git","url":"https://github.com/ShowClix/simplecrypt"},"keywords":["encryption","decryption","crypt","cryptography","cipher","strings","passwords"],"author":{"name":"me@nategood.com"},"license":"MIT","bugs":{"url":"https://github.com/ShowClix/simplecrypt/issues"},"readme":"# simplecrypt\n\nSimplecrypt is intended to be a very basic, concise library for doing\none thing: encrypting strings.  By default, it makes a lot of assumptions\nfor you, like what type of encryption to use (AES 192), what to use for\nthe key (cryptographically strong random data), how large to make the\nkey (256 bytes), the encoding to use (hex dump for ciphered, UTF-8 for\ndeciphered).  Some of these you can change (the encryption type, and the\nkey), but the focus here is simplicity.\n\nImportant note: if you do not specify the key, a random one is generated.\nIf you plan on storing the encrypted digest somewhere, then you will need\nto specify a key or retrieve the key from the simplecrypt instance.\n\n## Installation\n\n```\nnpm install simplecrypt\n```\n\n## Usage\n\n```javascript\nvar simplecrypt = require(\"simplecrypt\");\n\nvar sc = simplecrypt();\n\nvar digest = sc.encrypt(\"my secret\");\nconsole.log(digest); // \"66cea6eb1c18b8862485cf0604fa6062\"\n\nvar message = sc.decrypt(digest);\nconsole.log(message); // \"my secret\"\n```\n\n## API\n\n### simplecrypt([opts])\n\nInstantiates a new simplecrypt object.\n\nopts\n\nOptionally specify options to override default settings.\n\n - password: (string) password for encryption. defaults to large, cryptographically strong, random password.\n - salt: (string) salt to add to the message.  defaults to a random salt.\n - method: (string) the cipher to use.  defaults to aes192.\n - encoding: (string) encoding of the message. defaults to utf8.\n - digestEncoding: (string) encoding of the encrypted message. defaults to hex.\n\nreturns instance of the simplecrypt library\n\n### .encrypt(message)\n\nmessage: (string) message to encrypt\nreturns (string) encrypted message as hex string\n\n### .decrypt(digest)\n\ndigest: (string) encrypted message\nreturns (string) original message, unencrypted\n\n### .password()\n\nreturns (string|Buffer) password used for encryption\n\n### .salt()\n\nreturns (string) salt used\n","readmeFilename":"README.md","_id":"simplecrypt@0.1.0","dist":{"shasum":"8e376eaab9678a63d87108741f7c7d66e7e4d352","tarball":"https://registry.npmjs.org/simplecrypt/-/simplecrypt-0.1.0.tgz","integrity":"sha512-7kz4IBUMdoHSSXFPjxN23ztDe0DnLZl8FxqokcxacBFYytzLXO/YMxX3g5tYhDcMg2IANBirMtDcJqcZ9R3aoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID86gFIm/XVB8dJU+0oHyNk3sjEjLJKg71+z1gvuQbFdAiEAs6zR1WbLneRfQVhN6948rSqS1UGC7ZrRtbkZgGNYNLc="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"nategood","email":"me@nategood.com"},"maintainers":[{"name":"nategood","email":"me@nategood.com"}]}},"readme":"# simplecrypt\n\nSimplecrypt is intended to be a very basic, concise library for doing\none thing: encrypting strings.  By default, it makes a lot of assumptions\nfor you, like what type of encryption to use (AES 192), what to use for\nthe key (cryptographically strong random data), how large to make the\nkey (256 bytes), the encoding to use (hex dump for ciphered, UTF-8 for\ndeciphered).  Some of these you can change (the encryption type, and the\nkey), but the focus here is simplicity.\n\nImportant note: if you do not specify the key, a random one is generated.\nIf you plan on storing the encrypted digest somewhere, then you will need\nto specify a key or retrieve the key from the simplecrypt instance.\n\n## Installation\n\n```\nnpm install simplecrypt\n```\n\n## Usage\n\n```javascript\nvar simplecrypt = require(\"simplecrypt\");\n\nvar sc = simplecrypt();\n\nvar digest = sc.encrypt(\"my secret\");\nconsole.log(digest); // \"66cea6eb1c18b8862485cf0604fa6062\"\n\nvar message = sc.decrypt(digest);\nconsole.log(message); // \"my secret\"\n```\n","maintainers":[{"name":"nategood","email":"me@nategood.com"}],"time":{"modified":"2022-06-26T20:00:47.900Z","created":"2013-11-06T13:10:46.713Z","0.0.2":"2013-11-06T13:10:47.914Z","0.1.0":"2013-11-06T16:53:46.927Z"},"author":{"name":"me@nategood.com"},"repository":{"type":"git","url":"https://github.com/ShowClix/simplecrypt"}}