Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misspellings in error messages #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions index.js
Expand Up @@ -188,7 +188,7 @@

var AES = function(key) {
if (!(this instanceof AES)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

Object.defineProperty(this, 'key', {
Expand Down Expand Up @@ -373,7 +373,7 @@
*/
var ModeOfOperationECB = function(key) {
if (!(this instanceof ModeOfOperationECB)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

this.description = "Electronic Code Block";
Expand Down Expand Up @@ -426,7 +426,7 @@
*/
var ModeOfOperationCBC = function(key, iv) {
if (!(this instanceof ModeOfOperationCBC)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

this.description = "Cipher Block Chaining";
Expand All @@ -436,7 +436,7 @@
iv = createArray(16);

} else if (iv.length != 16) {
throw new Error('invalid initialation vector size (must be 16 bytes)');
throw new Error('invalid initialization vector size (must be 16 bytes)');
}

this._lastCipherblock = coerceArray(iv, true);
Expand Down Expand Up @@ -498,7 +498,7 @@
*/
var ModeOfOperationCFB = function(key, iv, segmentSize) {
if (!(this instanceof ModeOfOperationCFB)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

this.description = "Cipher Feedback";
Expand All @@ -508,7 +508,7 @@
iv = createArray(16);

} else if (iv.length != 16) {
throw new Error('invalid initialation vector size (must be 16 size)');
throw new Error('invalid initialization vector size (must be 16 size)');
}

if (!segmentSize) { segmentSize = 1; }
Expand Down Expand Up @@ -570,7 +570,7 @@
*/
var ModeOfOperationOFB = function(key, iv) {
if (!(this instanceof ModeOfOperationOFB)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

this.description = "Output Feedback";
Expand All @@ -580,7 +580,7 @@
iv = createArray(16);

} else if (iv.length != 16) {
throw new Error('invalid initialation vector size (must be 16 bytes)');
throw new Error('invalid initialization vector size (must be 16 bytes)');
}

this._lastPrecipher = coerceArray(iv, true);
Expand Down Expand Up @@ -612,7 +612,7 @@
*/
var Counter = function(initialValue) {
if (!(this instanceof Counter)) {
throw Error('Counter must be instanitated with `new`');
throw Error('Counter must be instantiated with `new`');
}

// We allow 0, but anything false-ish uses the default 1
Expand Down Expand Up @@ -670,7 +670,7 @@
*/
var ModeOfOperationCTR = function(key, counter) {
if (!(this instanceof ModeOfOperationCTR)) {
throw Error('AES must be instanitated with `new`');
throw Error('AES must be instantiated with `new`');
}

this.description = "Counter";
Expand Down