Skip to content

Commit c198bf6

Browse files
committed
Finishing renaming and version bump
1 parent 0b041a0 commit c198bf6

14 files changed

+27
-27
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# OTPEncryptJS
1+
# otp-encrypt-js
22

3-
[![NPM version](http://img.shields.io/npm/v/otpencryptjs.svg?style=flat)](https://npmjs.org/package/otpencryptjs)
4-
[![NPM downloads](http://img.shields.io/npm/dm/otpencryptjs.svg?style=flat)](https://npmjs.org/package/otpencryptjs)
5-
[![jSDelivr CDN](https://data.jsdelivr.com/v1/package/npm/otpencryptjs/badge?style=rounded)](https://www.jsdelivr.com/package/npm/otpencryptjs)
6-
[![tests](https://github.com/eklem/otpencryptjs/actions/workflows/tests.yml/badge.svg)](https://github.com/eklem/otpencryptjs/actions/workflows/tests.yml)
3+
[![NPM version](http://img.shields.io/npm/v/otp-encrypt-js.svg?style=flat)](https://npmjs.org/package/otp-encrypt-js)
4+
[![NPM downloads](http://img.shields.io/npm/dm/otp-encrypt-js.svg?style=flat)](https://npmjs.org/package/otp-encrypt-js)
5+
[![jSDelivr CDN](https://data.jsdelivr.com/v1/package/npm/otp-encrypt-js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/otp-encrypt-js)
6+
[![tests](https://github.com/eklem/otp-encrypt-js/actions/workflows/tests.yml/badge.svg)](https://github.com/eklem/otp-encrypt-js/actions/workflows/tests.yml)
77
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
88

99
Library of helper-functions for encrypting and decrypting messages with OTPs - One-time pads. Funcions for:
@@ -15,7 +15,7 @@ Library of helper-functions for encrypting and decrypting messages with OTPs - O
1515
* Check length of message is too long for the encryption key.
1616
* Language conversion tables, regular expressions for plaintext <-> plaincode and codebook for emojis.
1717

18-
![Example-code](https://github.com/eklem/otpencryptjs/blob/trunk/otp-library-03.png)
18+
![Example-code](https://github.com/eklem/otp-encrypt-js/blob/trunk/otp-library-03.png)
1919

2020
Will be core functionality together with [nfc-json-transfer](https://github.com/eklem/nfc-json-transfer) for creating [otp-encryption-toy](https://github.com/eklem/otp-encryption-toy)
2121

@@ -24,21 +24,21 @@ Will be core functionality together with [nfc-json-transfer](https://github.com/
2424
### CJS - CommonJS
2525

2626
```javaScript
27-
const { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('otpencryptjs')
27+
const { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('otp-encrypt-js')
2828
```
2929

3030
### ESM - Ecmascript Modules
3131

3232
```javaScript
33-
import { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from 'otpencryptjs'
33+
import { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from 'otp-encrypt-js'
3434
```
3535

3636

3737
## Usage
3838

3939
index.mjs:
4040
```javaScript
41-
import { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from 'otpencryptjs'
41+
import { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from 'otp-encrypt-js'
4242

4343
// The message
4444
const txt = 'Hello 👨‍👩‍👦‍👦🏳️‍🌈😀🇿🇼 world 123 æøå!'
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "otp-encrypt-js",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Library of helper-functions for encrypting and decrypting messages with OTPs - One-time pads.",
5-
"main": "./dist/otpencryptjs.nodejs.cjs.js",
6-
"module": "./dist/otpencryptjs.nodejs.esm.mjs",
7-
"browser": "./dist/otpencryptjs.browser.umd.js",
5+
"main": "./dist/otp-encrypt-js.nodejs.cjs.js",
6+
"module": "./dist/otp-encrypt-js.nodejs.esm.mjs",
7+
"browser": "./dist/otp-encrypt-js.browser.umd.js",
88
"scripts": {
99
"build": "rollup --config",
1010
"test": "npm run build && standard './scripts/*.js' && cd ./test && npx ava cjs.nodejs.js && npx ava esm.nodejs.mjs"
1111
},
1212
"repository": {
1313
"type": "git",
14-
"url": "git+https://github.com/eklem/OneTimePadJS.git"
14+
"url": "git+https://github.com/eklem/otp-encrypt-js.git"
1515
},
1616
"devDependencies": {
1717
"batr": "^2.1.10",
@@ -31,9 +31,9 @@
3131
"author": "Espen Klem",
3232
"license": "MIT",
3333
"bugs": {
34-
"url": "https://github.com/eklem/onetimepadjs/issues"
34+
"url": "https://github.com/eklem/otp-encrypt-js/issues"
3535
},
36-
"homepage": "https://github.com/eklem/onetimepadjs#readme",
36+
"homepage": "https://github.com/eklem/otp-encrypt-js#readme",
3737
"directories": {
3838
"test": "test"
3939
}

rollup.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export default [
99
{
1010
input: './src/index-node.js',
1111
output: [
12-
{ file: './dist/otpencryptjs.nodejs.cjs.js', format: 'cjs', exports: 'named' },
13-
{ file: './dist/otpencryptjs.nodejs.esm.mjs', format: 'es' }
12+
{ file: './dist/otp-encrypt-js.nodejs.cjs.js', format: 'cjs', exports: 'named' },
13+
{ file: './dist/otp-encrypt-js.nodejs.esm.mjs', format: 'es' }
1414
],
1515
plugins: [
1616
resolve(), // so Rollup can find `ms`
@@ -22,8 +22,8 @@ export default [
2222
{
2323
input: './src/index-node.js',
2424
output: [
25-
{ file: './dist/otpencryptjs.nodejs.cjs.min.js', format: 'cjs', exports: 'named' },
26-
{ file: './dist/otpencryptjs.nodejs.esm.min.mjs', format: 'es' }
25+
{ file: './dist/otp-encrypt-js.nodejs.cjs.min.js', format: 'cjs', exports: 'named' },
26+
{ file: './dist/otp-encrypt-js.nodejs.esm.min.mjs', format: 'es' }
2727
],
2828
plugins: [
2929
resolve(), // so Rollup can find `ms`
@@ -37,8 +37,8 @@ export default [
3737
{
3838
input: './src/index-browser.js',
3939
output: [
40-
{ name: 'otp', file: './dist/otpencryptjs.browser.umd.js', format: 'umd', exports: 'named', globals: { crypto: 'globalVariable' } },
41-
{ file: './dist/otpencryptjs.browser.esm.mjs', format: 'es', globals: { crypto: 'globalVariable' } }
40+
{ name: 'otp', file: './dist/otp-encrypt-js.browser.umd.js', format: 'umd', exports: 'named', globals: { crypto: 'globalVariable' } },
41+
{ file: './dist/otp-encrypt-js.browser.esm.mjs', format: 'es', globals: { crypto: 'globalVariable' } }
4242
],
4343
plugins: [
4444
resolve(), // so Rollup can find `ms`
@@ -50,8 +50,8 @@ export default [
5050
{
5151
input: './src/index-browser.js',
5252
output: [
53-
{ name: 'otp', file: './dist/otpencryptjs.browser.umd.min.js', format: 'umd', exports: 'named', globals: { crypto: 'globalVariable' } },
54-
{ file: './dist/otpencryptjs.browser.esm.min.mjs', format: 'es', globals: { crypto: 'globalVariable' } }
53+
{ name: 'otp', file: './dist/otp-encrypt-js.browser.umd.min.js', format: 'umd', exports: 'named', globals: { crypto: 'globalVariable' } },
54+
{ file: './dist/otp-encrypt-js.browser.esm.min.mjs', format: 'es', globals: { crypto: 'globalVariable' } }
5555
],
5656
plugins: [
5757
resolve(), // so Rollup can find `ms`

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('./dist/otp-ed-lib.nodejs.cjs.js')
1+
const { textToPlaincode, plaincodeToText, createOnetimePad, nob, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('./dist/otp-encrypt-js.nodejs.cjs.js')
22

33
// The message
44
const message = 'Hello 👨‍👩‍👦‍👦🏳️‍🌈😀🇿🇼 world, 123:æøå! https://somesecreturl.com/'

test/cjs.nodejs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const test = require('ava')
2-
const { textToPlaincode, plaincodeToText, createOnetimePad, eng, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('../dist/otpencryptjs.nodejs.cjs.js')
2+
const { textToPlaincode, plaincodeToText, createOnetimePad, eng, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } = require('../dist/otp-encrypt-js.nodejs.cjs.js')
33
const message = 'Hello 🏴󠁧󠁢󠁳󠁣󠁴󠁿👨‍👩‍👦‍👦🏳️‍🌈😀🇿🇼 world, 123! https://somesecreturl.com/ 🩷'
44

55
test('Text to plaincode + tooLong: false', t => {

test/esm.nodejs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava'
2-
import { textToPlaincode, plaincodeToText, createOnetimePad, eng, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from '../dist/otpencryptjs.nodejs.cjs.js'
2+
import { textToPlaincode, plaincodeToText, createOnetimePad, eng, codebook, checkLength, encryptPlaincode, decryptEncryptedMsg } from '../dist/otp-encrypt-js.nodejs.cjs.js'
33
const message = 'hello 🏴󠁧󠁢󠁳󠁣󠁴󠁿👨‍👩‍👦‍👦🏳️‍🌈😀🇿🇼 world, 123! https://somesecreturl.com/ 🩷'
44

55
test('Text to plaincode + tooLong: false', t => {

0 commit comments

Comments
 (0)