review: fix invalid substring

This commit is contained in:
Wyatt Johnson
2018-10-19 16:28:13 +00:00
committed by GitHub
parent 3a69e0cf96
commit fabec2c89b
+1 -1
View File
@@ -122,7 +122,7 @@ function SharedSecret({ kid = undefined, secret = null }, algorithm) {
// If the secret is base64 encoded, then decode it!
if (secret.startsWith('base64:')) {
secret = Buffer.from(secret.substring(6), 'base64').toString();
secret = Buffer.from(secret.substring(7), 'base64').toString();
}
return new Secret({