Skip to content

Commit 2627ff5

Browse files
committed
Updating comments
1 parent 5cf5f4a commit 2627ff5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/mcapi/crypto/crypto.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function Crypto(config) {
1818
this.encryptionCertificate = readPublicCertificate(config.encryptionCertificate);
1919

2020
// Load private key (for decryption)
21-
this.privateKey = getPrivateKey(config)
21+
this.privateKey = getPrivateKey(config);
2222

2323
this.encoding = config.dataEncoding;
2424

@@ -206,7 +206,7 @@ function getPrivateKey(config) {
206206
return getPrivateKeyDer(config.keyStore);
207207
}
208208
}
209-
return null
209+
return null;
210210
}
211211

212212
/**
@@ -247,7 +247,8 @@ function getPrivateKey12(p12Path, alias, password) {
247247
}
248248

249249
/**
250-
* @private
250+
* Load a PKCS#1 PEM (starts with "-----BEGIN RSA PRIVATE KEY-----")
251+
* or a PKCS#8 PEM (starts with "-----BEGIN PRIVATE KEY-----")"
251252
*/
252253
function getPrivateKeyPem(pemPath) {
253254
let pemContent = fs.readFileSync(pemPath, 'binary');
@@ -263,7 +264,7 @@ function getPrivateKeyPem(pemPath) {
263264
}
264265

265266
/**
266-
* @private
267+
* Load a Binary DER-encoded PKCS#8
267268
*/
268269
function getPrivateKeyDer(derPath) {
269270
const derContent = fs.readFileSync(derPath, 'binary');

0 commit comments

Comments
 (0)