aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/noscrypt.c2
-rw-r--r--src/noscrypt.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/noscrypt.c b/src/noscrypt.c
index 71a3975..15d8da8 100644
--- a/src/noscrypt.c
+++ b/src/noscrypt.c
@@ -543,7 +543,7 @@ NC_EXPORT NCResult NC_CC NCValidateSecretKey(
CHECK_INVALID_ARG(ctx->secpCtx)
//Validate the secret key
- return secp256k1_ec_seckey_verify(ctx->secpCtx, sk->key) ? NC_SUCCESS : E_INVALID_ARG;
+ return secp256k1_ec_seckey_verify(ctx->secpCtx, sk->key);
}
//Ecdsa Functions
diff --git a/src/noscrypt.h b/src/noscrypt.h
index b282085..34e119d 100644
--- a/src/noscrypt.h
+++ b/src/noscrypt.h
@@ -275,7 +275,7 @@ NC_EXPORT NCResult NC_CC NCGetPublicKey(
is functionally the same as calling secp256k1_ec_seckey_verify.
* @param ctx A pointer to the existing library context
* @param sk A pointer to the secret key to verify
-* @return NC_SUCCESS if the secret key is in a valid format, otherwise an error code
+* @return 1 if the secret key is valid, 0 if it is not, otherwise an error code
*/
NC_EXPORT NCResult NC_CC NCValidateSecretKey(
const NCContext* ctx,