From ed256f1b6688c1f0b265aa265e8be3ce0d30d9b5 Mon Sep 17 00:00:00 2001 From: Samanta Navarro Date: Tue, 17 Jun 2025 11:55:49 +0000 Subject: [PATCH] Fix typos Typos found with codespell. --- README.md | 2 +- flash/SocketPool.as | 2 +- lib/aes.js | 2 +- lib/pbe.js | 2 +- lib/prime.worker.js | 2 +- lib/rsa.js | 12 ++++++------ lib/tls.js | 4 ++-- lib/util.js | 6 +++--- lib/x509.js | 2 +- lib/xhr.js | 2 +- tests/legacy/socketPool.html | 2 +- tests/legacy/tls.html | 2 +- tests/legacy/xhr.html | 2 +- tests/support/task.js | 2 +- tests/unit/asn1.js | 6 +++--- tests/unit/rsa.js | 2 +- tests/websockets/server-webid.js | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 6f3279efb..06cff04c9 100644 --- a/README.md +++ b/README.md @@ -2024,7 +2024,7 @@ Contact Donations --------- -Financial support is welcome and helps contribute to futher development: +Financial support is welcome and helps contribute to further development: * For [PayPal][] please send to paypal@digitalbazaar.com. * Something else? Please contact support@digitalbazaar.com. diff --git a/flash/SocketPool.as b/flash/SocketPool.as index f61dfa855..384400fd5 100644 --- a/flash/SocketPool.as +++ b/flash/SocketPool.as @@ -42,7 +42,7 @@ package private var mEventDispatcher:EventDispatcher; /** - * Creates a new, unitialized SocketPool. + * Creates a new, uninitialized SocketPool. * * @throws Error - if no external interface is available to provide * javascript access. diff --git a/lib/aes.js b/lib/aes.js index 3c1ddb29b..5bdd2acc3 100644 --- a/lib/aes.js +++ b/lib/aes.js @@ -325,7 +325,7 @@ var imix; // inverse mix-columns table * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0. * * Addition is performed by XOR'ing like powers of x. Multiplication - * is performed in two steps, the first is an algebriac expansion as + * is performed in two steps, the first is an algebraic expansion as * you would do normally (where addition is XOR). But the result is * a polynomial larger than 3 degrees and thus it cannot fit in a word. So * next the result is modularly reduced by an AES-specific polynomial of diff --git a/lib/pbe.js b/lib/pbe.js index cf8456ba6..f3cfa70dd 100644 --- a/lib/pbe.js +++ b/lib/pbe.js @@ -672,7 +672,7 @@ pki.pbe.generatePkcs12Key = function(password, salt, id, iter, n, md) { D.fillWithByte(id, v); /* 2. Concatenate copies of the salt together to create a string S of length - v * ceil(s / v) bytes (the final copy of the salt may be trunacted + v * ceil(s / v) bytes (the final copy of the salt may be truncated to create S). Note that if the salt is the empty string, then so is S. */ var Slen = v * Math.ceil(s / v); diff --git a/lib/prime.worker.js b/lib/prime.worker.js index ce1355d9a..b145f8aeb 100644 --- a/lib/prime.worker.js +++ b/lib/prime.worker.js @@ -56,7 +56,7 @@ function findPrime(data) { } function isProbablePrime(n) { - // divide by low primes, ignore even checks, etc (n alread aligned properly) + // divide by low primes, ignore even checks, etc (n already aligned properly) var i = 1; while(i < LOW_PRIMES.length) { var m = LOW_PRIMES[i]; diff --git a/lib/rsa.js b/lib/rsa.js index 5c73209f9..b207a6385 100644 --- a/lib/rsa.js +++ b/lib/rsa.js @@ -282,7 +282,7 @@ var digestInfoValidator = { constructed: false, capture: 'algorithmIdentifier' }, { - // NULL paramters + // NULL parameters name: 'DigestInfo.DigestAlgorithm.parameters', tagClass: asn1.Class.UNIVERSAL, type: asn1.Type.NULL, @@ -316,7 +316,7 @@ var digestInfoValidator = { * * @param md the message digest object with the hash to sign. * - * @return the encoded message (ready for RSA encrytion) + * @return the encoded message (ready for RSA encryption) */ var emsaPkcs1v15encode = function(md) { // get the oid for the algorithm @@ -498,7 +498,7 @@ var _modPow = function(x, key, pub) { * * The parameter bt controls whether to put padding bytes before the * message passed in. Set bt to either true or false to disable padding - * completely (in order to handle e.g. EMSA-PSS encoding seperately before), + * completely (in order to handle e.g. EMSA-PSS encoding separately before), * signaling whether the encryption operation is a public key operation * (i.e. encrypting data) or not, i.e. private key operation (data signing). * @@ -1173,7 +1173,7 @@ pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) { } // check hash algorithm identifier // see PKCS1-v1-5DigestAlgorithms in RFC 8017 - // FIXME: add support to vaidator for strict value choices + // FIXME: add support to validator for strict value choices var oid = asn1.derToOid(capture.algorithmIdentifier); if(!(oid === forge.oids.md2 || oid === forge.oids.md5 || @@ -1196,7 +1196,7 @@ pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) { throw new Error( 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' + 'DigestInfo value. ' + - 'Missing algorithm identifer NULL parameters.'); + 'Missing algorithm identifier NULL parameters.'); } } @@ -1637,7 +1637,7 @@ function _decodePkcs1_v1_5(em, key, pub, ml) { 1. The encryption block EB cannot be parsed unambiguously. 2. The padding string PS consists of fewer than eight octets - or is inconsisent with the block type BT. + or is inconsistent with the block type BT. 3. The decryption process is a public-key operation and the block type BT is not 00 or 01, or the decryption process is a private-key operation and the block type is not 02. diff --git a/lib/tls.js b/lib/tls.js index fadfd646f..00d45089b 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -758,7 +758,7 @@ tls.handleUnexpected = function(c, record) { */ tls.handleHelloRequest = function(c, record, length) { // ignore renegotiation requests from the server during a handshake, but - // if handshaking, send a warning alert that renegotation is denied + // if handshaking, send a warning alert that renegotiation is denied if(!c.handshaking && c.handshakes > 0) { // send alert warning tls.queue(c, tls.createAlert(c, { @@ -2258,7 +2258,7 @@ hsTable[tls.ConnectionEnd.client] = [ ]; // map server current expect state and handshake type to function -// Note: CAD[CH] does not map to FB because renegotation is prohibited +// Note: CAD[CH] does not map to FB because renegotiation is prohibited var H7 = tls.handleClientHello; var H8 = tls.handleClientKeyExchange; var H9 = tls.handleCertificateVerify; diff --git a/lib/util.js b/lib/util.js index aaede5ad2..db2341ac7 100644 --- a/lib/util.js +++ b/lib/util.js @@ -677,7 +677,7 @@ util.ByteStringBuffer.prototype.clear = function() { }; /** - * Shortens this buffer by triming bytes off of the end of this buffer. + * Shortens this buffer by trimming bytes off of the end of this buffer. * * @param count the number of bytes to trim off. * @@ -1343,7 +1343,7 @@ util.DataBuffer.prototype.clear = function() { }; /** - * Shortens this buffer by triming bytes off of the end of this buffer. + * Shortens this buffer by trimming bytes off of the end of this buffer. * * @param count the number of bytes to trim off. * @@ -2316,7 +2316,7 @@ util.format = function(format) { parts.push(''); } break; - // FIXME: do proper formating for numbers, etc + // FIXME: do proper formatting for numbers, etc //case 'f': //case 'd': case '%': diff --git a/lib/x509.js b/lib/x509.js index 2877810c1..99209ffbf 100644 --- a/lib/x509.js +++ b/lib/x509.js @@ -2289,7 +2289,7 @@ function _fillMissingExtensionFields(e, options) { * Convert signature parameters object to ASN.1 * * @param {String} oid Signature algorithm OID - * @param params The signature parametrs object + * @param params The signature parameters object * @return ASN.1 object representing signature parameters */ function _signatureParametersToAsn1(oid, params) { diff --git a/lib/xhr.js b/lib/xhr.js index fa928352b..1527042b6 100644 --- a/lib/xhr.js +++ b/lib/xhr.js @@ -459,7 +459,7 @@ xhrApi.create = function(options) { // set request method to given method // set request URL // set username, password - // set asychronous flag + // set asynchronous flag _state.sendFlag = false; xhr.responseText = ''; xhr.responseXML = null; diff --git a/tests/legacy/socketPool.html b/tests/legacy/socketPool.html index 9edcf41aa..fa44a835a 100644 --- a/tests/legacy/socketPool.html +++ b/tests/legacy/socketPool.html @@ -209,7 +209,7 @@

SocketPool Tests

- +

Could not load the flash SocketPool.

diff --git a/tests/legacy/tls.html b/tests/legacy/tls.html index 8f59ee1fb..a20c3c336 100644 --- a/tests/legacy/tls.html +++ b/tests/legacy/tls.html @@ -339,7 +339,7 @@

TLS Tests

- +

Could not load the flash SocketPool.

diff --git a/tests/legacy/xhr.html b/tests/legacy/xhr.html index fbb086f2a..28ba5dcb1 100644 --- a/tests/legacy/xhr.html +++ b/tests/legacy/xhr.html @@ -29,7 +29,7 @@

XmlHttpRequest Tests

- +

Could not load the flash SocketPool.

diff --git a/tests/support/task.js b/tests/support/task.js index 4607ecb12..0d614a207 100644 --- a/tests/support/task.js +++ b/tests/support/task.js @@ -66,7 +66,7 @@ var ERROR = 'error'; * SLEEP: sleep for a period of time * WAKEUP: wakeup early from SLEEPING state * CANCEL: cancel further tasks - * FAIL: a failure occured + * FAIL: a failure occurred */ var STOP = 'stop'; var START = 'start'; diff --git a/tests/unit/asn1.js b/tests/unit/asn1.js index 65a1db510..29ff281c1 100644 --- a/tests/unit/asn1.js +++ b/tests/unit/asn1.js @@ -441,7 +441,7 @@ var UTIL = require('../../lib/util'); der = ASN1.toDer(asn1); if(options.roundtrip) { // byte comparisons for round-trip testing can fail due to - // symantically safe changes such as changing the length encoding. + // semantically safe changes such as changing the length encoding. // test a roundtrip for data where it makes sense. ASSERT.equal( UTIL.bytesToHex(bytes), @@ -1047,7 +1047,7 @@ var UTIL = require('../../lib/util'); // could extend out to any structure size: _add(b, '02 06 FF FF FF FF FF FF'); // the roundtrip issue can exist for long lengths that could - // compress to short lenghts, this could be output as '02 02 01 23': + // compress to short lengths, this could be output as '02 02 01 23': _add(b, '02 81 02 01 23'); // also an issue for indefinite length structures that will // have a known length later: @@ -1278,7 +1278,7 @@ var UTIL = require('../../lib/util'); UTIL.bytesToHex(derOut), UTIL.bytesToHex(_h2b(hout))); } - // optimial + // optimal _test('02 01 01', '02 01 01'); _test('02 01 FF', '02 01 FF'); _test('02 02 00 FF', '02 02 00 FF'); diff --git a/tests/unit/rsa.js b/tests/unit/rsa.js index b1c1b64aa..d68946d8f 100644 --- a/tests/unit/rsa.js +++ b/tests/unit/rsa.js @@ -581,7 +581,7 @@ var UTIL = require('../../lib/util'); /* Second step, use private key decryption to verify successful encryption. The encrypted message differs every time, since it is padded with random data. Therefore just rely on the decryption - routine to work, which is tested seperately against an externally + routine to work, which is tested separately against an externally provided encrypted message. */ key = PKI.privateKeyFromPem(params.privateKeyPem); ASSERT.equal(key.decrypt(data), message); diff --git a/tests/websockets/server-webid.js b/tests/websockets/server-webid.js index 5319372bb..c2d4e2a1b 100644 --- a/tests/websockets/server-webid.js +++ b/tests/websockets/server-webid.js @@ -80,7 +80,7 @@ var getPublicKey = function(data, uri, callback) { var hex = CERT + 'hex'; var decimal = CERT + 'decimal'; - // gets a resource identifer from a node + // gets a resource identifier from a node var getResource = function(node, key) { var rval = null;