Skip to content

Commit 369f9f7

Browse files
committed
rename to string-crypto
1 parent 5668e9d commit 369f9f7

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# String Crypt
1+
# String Crypto
22

33
Small and and simple (yet secure) library to encrypt and decrypt strings using PBKDF2 for key derivation and AES (defaulted to 256-bit / SHA512).
44

@@ -8,16 +8,16 @@ Please consider:
88

99
- [Buying me a coffee](https://www.buymeacoffee.com/jeanlescure) :coffee:
1010
- Supporting me on [Patreon](https://www.patreon.com/jeanlescure) :trophy:
11-
- Starring this repo on [Github](https://github.com/jeanlescure/string-crypt) :star2: :octocat:
11+
- Starring this repo on [Github](https://github.com/jeanlescure/string-crypto) :star2: :octocat:
1212

1313
## Usage
1414

1515
```
16-
yarn add string-crypt
16+
yarn add string-crypto
1717
```
1818

1919
```ts
20-
import StringCrypt from 'string-crypt';
20+
import StringCrypto from 'string-crypto';
2121

2222
const stringToProtect = 'What is the largest (rational) number n such that there are positive integers p, q, r such that 1 - 1/p - 1/q - 1/r = 1/n?';
2323

@@ -26,7 +26,7 @@ const password = 'Oh-no,not-again';
2626
const {
2727
encryptString,
2828
decryptString,
29-
} = new StringCrypt();
29+
} = new StringCrypto();
3030

3131
let encryptedString = encryptString(topSecret, password);
3232

@@ -48,7 +48,7 @@ const options = {
4848
const {
4949
encryptString: saferEncrypt,
5050
decryptString: saferDecrypt,
51-
} = new StringCrypt(options);
51+
} = new StringCrypto(options);
5252
```
5353

5454
## Development and build scripts

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "string-crypt",
2+
"name": "string-crypto",
33
"version": "1.0.0",
44
"description": "Small and and simple (yet secure) library to encrypt and decrypt strings using PBKDF2 for key derivation and AES (defaulted to 256-bit / SHA512)",
55
"main": "dist/index.js",
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"build": "rollup -c",
1111
"dev": "concurrently \"rollup -cw\" \"nodemon --inspect runkit.js\"",
12-
"postinstall": "yarn link && yarn link string-crypt"
12+
"postinstall": "yarn link && yarn link string-crypto"
1313
},
1414
"devDependencies": {
1515
"@rollup/plugin-commonjs": "^15.0.0",

runkit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var StringCrypt = require('string-crypt');
1+
var StringCrypto = require('string-crypto');
22

33
const topSecret = 'What is the largest (rational) number n such that there are positive integers p, q, r such that 1 - 1/p - 1/q - 1/r = 1/n?';
44

@@ -7,7 +7,7 @@ const password = 'Oh-no,not-again';
77
const {
88
encryptString,
99
decryptString,
10-
} = new StringCrypt();
10+
} = new StringCrypto();
1111

1212
let encryptedString = encryptString(topSecret, password);
1313

@@ -18,7 +18,7 @@ console.log('Decrypted String:', decryptString(encryptedString, password));
1818
const {
1919
encryptString: saferEncrypt,
2020
decryptString: saferDecrypt,
21-
} = new StringCrypt({
21+
} = new StringCrypto({
2222
salt: '2f0ijf2039j23r09j2fg45o9ng98um4o',
2323
iterations: 10,
2424
});

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const deriveKey = (
5656
return pbkdf2Sync(password, salt, iterations, keylen, digest);
5757
};
5858

59-
class StringCrypt {
59+
class StringCrypto {
6060
private _deriveKeyOptions: DeriveKeyOpts;
6161

6262
constructor(options?: DeriveKeyOpts) {
@@ -118,4 +118,4 @@ class StringCrypt {
118118
};
119119
}
120120

121-
export default StringCrypt;
121+
export default StringCrypto;

0 commit comments

Comments
 (0)