addedInput schema / additionalProperties
Added value: +false
removedInput schema / properties / N
Removed value: -{
- "type": "integer"
-}
addedInput schema / properties / hash
Added value: +{
+ "description": "The encoded scrypt hash to verify against, in the format produced by crypto_scrypt: $scrypt$N=<N>,r=<r>,p=<p>$<saltHex>$<base64DerivedKey>. The N, r, p, and salt are read from this string to recompute the derivation and compare it against the supplied password.",
+ "examples": [
+ "$scrypt$N=32768,r=8,p=1$a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6$Base64DerivedKey=="
+ ],
+ "type": "string"
+}
removedInput schema / properties / length
Removed value: -{
- "type": "integer"
-}
removedInput schema / properties / p
Removed value: -{
- "type": "integer"
-}
addedInput schema / properties / password / description
Added value: +"The plaintext password to test against the hash."
addedInput schema / properties / password / examples
Added value: +[
+ "correct horse battery staple"
+]
removedInput schema / properties / r
Removed value: -{
- "type": "integer"
-}
removedInput schema / properties / salt
Removed value: -{
- "nullable": true
-}
changedInput schema / required
Previous value: -[
- "password",
- "N",
- "r",
- "p",
- "length",
- "salt"
-]New value: +[
+ "password",
+ "hash"
+]
changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "properties": {
+ "error": {
+ "description": "Error message when verification fails (e.g. invalid hash format); null on success.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "info": {
+ "description": "Parameters parsed from the hash; null when the hash format is invalid.",
+ "properties": {
+ "N": {
+ "description": "CPU/memory cost factor (a power of 2).",
+ "type": "integer"
+ },
+ "length": {
+ "description": "Derived key length in bytes.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "Parallelization factor.",
+ "type": "integer"
+ },
+ "r": {
+ "description": "Block-size factor.",
+ "type": "integer"
+ },
+ "salt": {
+ "description": "Salt parsed from the hash, in hexadecimal.",
+ "type": "string"
+ },
+ "saltLength": {
+ "description": "Length of the hex salt string.",
+ "type": "integer"
+ }
+ },
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "security": {
+ "description": "Strength analysis of the parsed parameters; null on error.",
+ "properties": {
+ "estimatedTimeMs": {
+ "description": "Rough derivation time estimate in milliseconds.",
+ "type": "number"
+ },
+ "level": {
+ "description": "Qualitative rating: Very Low, Low, Moderate, High, or Very High.",
+ "type": "string"
+ },
+ "maxScore": {
+ "description": "Maximum possible score (3.0).",
+ "type": "number"
+ },
+ "memoryUsageKB": {
+ "description": "Estimated memory use in KB.",
+ "type": "number"
+ },
+ "memoryUsageMB": {
+ "description": "Estimated memory use in MB.",
+ "type": "number"
+ },
+ "notes": {
+ "description": "Advisory notes about weak parameters.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "score": {
+ "description": "Numeric strength score.",
+ "type": "number"
+ },
+ "totalOperations": {
+ "description": "The N * r * p work factor.",
+ "type": "integer"
+ }
+ },
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "verified": {
+ "description": "True when the password matches the supplied hash.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+}