LaminarForge API Security Utils API
lf-security-utils — hash, HMAC, JWT, token gen, OTP, password, AES, RSA
lf-security-utils — hash, HMAC, JWT, token gen, OTP, password, AES, RSA
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/laminarforge-dev:laminarforge-dev-security-utils-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Laminarforge Dev Security Utils API
version: 1.1.0
contact:
url: https://laminarforge.dev/contact
description: 'Operations tagged Security Utils across 2 of this provider''s published API definitions: laminarforge-dev-openapi.json, laminarforge-dev-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Security Utils
description: lf-security-utils — hash, HMAC, JWT, token gen, OTP, password, AES, RSA
paths:
/v1/md5:
get:
tags:
- Security Utils
summary: Compute MD5 hash
description: Computes the MD5 hash of an input string. Returns the hash as a 32-character hexadecimal string.
operationId: computeMd5
security:
- ApiKeyAuth: []
parameters:
- name: input
in: query
required: true
schema:
type: string
description: Text to hash
responses:
'200':
description: MD5 hash result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
input:
type: string
algorithm:
type: string
example: MD5
hash:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/sha256:
get:
tags:
- Security Utils
summary: Compute SHA-256 hash
description: Computes the SHA-256 hash of an input string. Returns the hash as a 64-character hexadecimal string.
operationId: computeSha256
security:
- ApiKeyAuth: []
parameters:
- name: input
in: query
required: true
schema:
type: string
description: Text to hash
responses:
'200':
description: SHA-256 hash result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
input:
type: string
algorithm:
type: string
example: SHA-256
hash:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/hash:
get:
tags:
- Security Utils
summary: Compute hash (md5/sha1/sha256/sha384/sha512/all)
description: 'Computes a hash using the specified algorithm: md5, sha1, sha256, sha384, sha512, or ''all'' to compute all five at once.'
operationId: computeHash
security:
- ApiKeyAuth: []
parameters:
- name: input
in: query
required: true
schema:
type: string
description: Text to hash
- name: algorithm
in: query
schema:
type: string
default: sha256
enum:
- md5
- sha1
- sha256
- sha384
- sha512
- all
description: Hash algorithm
- name: algo
in: query
schema:
type: string
description: Alias for 'algorithm'
responses:
'200':
description: Hash result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
input:
type: string
algorithm:
type: string
hash:
type: string
results:
type: object
description: All algorithm results when algorithm=all
properties:
MD5:
type: string
SHA1:
type: string
SHA256:
type: string
SHA384:
type: string
SHA512:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/hmac:
get:
tags:
- Security Utils
summary: HMAC sign/verify
description: Signs data using HMAC with SHA-256, SHA-384, or SHA-512, or verifies an existing HMAC signature. Accepts a secret key and data string.
operationId: computeHmac
security:
- ApiKeyAuth: []
parameters:
- name: data
in: query
required: true
schema:
type: string
description: Data to sign or verify
- name: secret
in: query
required: true
schema:
type: string
description: HMAC secret key
- name: algorithm
in: query
schema:
type: string
default: SHA-256
enum:
- SHA-1
- SHA-256
- SHA-384
- SHA-512
description: Hash algorithm
- name: mode
in: query
schema:
type: string
default: sign
enum:
- sign
- verify
description: Operation mode
- name: signature
in: query
schema:
type: string
description: Existing signature hex to verify against (required when mode=verify)
responses:
'200':
description: HMAC result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
mode:
type: string
enum:
- sign
- verify
algorithm:
type: string
signature:
type: string
key_length:
type: integer
data_length:
type: integer
valid:
type: boolean
'400':
$ref: '#/components/responses/BadRequest'
/v1/jwt-encode:
get:
tags:
- Security Utils
summary: JWT encode
description: Creates a signed JWT token using HMAC with HS256, HS384, or HS512. Accepts a JSON payload and secret key. Automatically adds iat and exp claims.
operationId: encodeJwt
security:
- ApiKeyAuth: []
parameters:
- name: payload
in: query
required: true
schema:
type: string
description: JSON string representing the JWT payload
- name: secret
in: query
required: true
schema:
type: string
description: Secret key for signing
- name: algorithm
in: query
schema:
type: string
default: HS256
enum:
- HS256
- HS384
- HS512
description: JWT signing algorithm
- name: expires_in
in: query
schema:
type: integer
default: 3600
description: Token expiry in seconds from now
responses:
'200':
description: Encoded JWT token
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
token:
type: string
algorithm:
type: string
header:
type: object
payload:
type: object
expires_at:
type: integer
ttl_seconds:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
/v1/jwt-verify:
get:
tags:
- Security Utils
summary: JWT verify/decode
description: Decodes and verifies a JWT token's signature using HS256/HS384/HS512. Returns decoded header and payload, expiry status, and remaining TTL.
operationId: verifyJwt
security:
- ApiKeyAuth: []
parameters:
- name: token
in: query
required: true
schema:
type: string
description: JWT token to verify
- name: secret
in: query
required: true
schema:
type: string
description: Secret key to verify signature
responses:
'200':
description: JWT verification result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
valid:
type: boolean
header:
type: object
payload:
type: object
expired:
type: boolean
exp:
type:
- integer
- 'null'
ttl_remaining:
type:
- integer
- 'null'
not_before:
type:
- integer
- 'null'
issuer:
type:
- string
- 'null'
subject:
type:
- string
- 'null'
warnings:
type: array
items:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/totp:
get:
tags:
- Security Utils
summary: TOTP generate/verify
description: Generates or verifies a TOTP code using a base32-encoded secret. Supports 6-8 digit codes with configurable time period (default 30s).
operationId: handleTotp
security:
- ApiKeyAuth: []
parameters:
- name: secret
in: query
required: true
schema:
type: string
description: Base32-encoded secret key
- name: mode
in: query
schema:
type: string
default: generate
enum:
- generate
- verify
description: Operation mode
- name: code
in: query
schema:
type: string
description: TOTP code to verify (required when mode=verify)
- name: digits
in: query
schema:
type: integer
default: 6
minimum: 6
maximum: 8
description: Number of digits (6, 7, or 8)
- name: period
in: query
schema:
type: integer
default: 30
minimum: 1
description: Time step in seconds
responses:
'200':
description: TOTP result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
mode:
type: string
code:
type: string
digits:
type: integer
period:
type: integer
remaining_seconds:
type: integer
valid:
type: boolean
secret:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/password-hash:
get:
tags:
- Security Utils
summary: Password hash/verify
description: Hashes a password with a salt using iterated SHA-256, or verifies a password against a stored hash. Supports configurable iteration count.
operationId: handlePasswordHash
security:
- ApiKeyAuth: []
parameters:
- name: password
in: query
required: true
schema:
type: string
description: Password to hash or verify
- name: mode
in: query
schema:
type: string
default: hash
enum:
- hash
- verify
description: Operation mode
- name: hash
in: query
schema:
type: string
description: Stored hash (required when mode=verify)
- name: salt
in: query
schema:
type: string
description: Salt (required when mode=verify; auto-generated when mode=hash)
- name: iterations
in: query
schema:
type: integer
default: 100000
minimum: 1000
maximum: 1000000
description: Iteration count
responses:
'200':
description: Password hash result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
mode:
type: string
enum:
- hash
- verify
algorithm:
type: string
hash:
type: string
salt:
type: string
salt_length:
type: integer
iterations:
type: integer
valid:
type: boolean
'400':
$ref: '#/components/responses/BadRequest'
/v1/aes-encrypt:
get:
tags:
- Security Utils
summary: AES-256-GCM encrypt
description: Encrypts plaintext using AES-256-GCM with a random 12-byte IV. Returns ciphertext, IV, and authentication tag. Supports hex or base64 output encoding.
operationId: aesEncrypt
security:
- ApiKeyAuth: []
parameters:
- name: input
in: query
required: true
schema:
type: string
description: Plaintext to encrypt
- name: key
in: query
required: true
schema:
type: string
description: AES-256 key as 64-character hex string
- name: aad
in: query
schema:
type: string
description: Additional Authenticated Data (AAD)
- name: encoding
in: query
schema:
type: string
default: hex
enum:
- hex
- base64
- base64url
description: Output encoding for ciphertext
responses:
'200':
description: AES encryption result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
algorithm:
type: string
example: AES-256-GCM
ciphertext:
type: string
iv:
type: string
iv_length:
type: integer
tag:
type: string
tag_length:
type: integer
ciphertext_length:
type: integer
encoding:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/aes-decrypt:
get:
tags:
- Security Utils
summary: AES-256-GCM decrypt
description: Decrypts AES-256-GCM ciphertext using the same key, IV, and optional AAD. Accepts hex or base64 ciphertext.
operationId: aesDecrypt
security:
- ApiKeyAuth: []
parameters:
- name: ciphertext
in: query
required: true
schema:
type: string
description: Ciphertext (hex or base64)
- name: key
in: query
required: true
schema:
type: string
description: AES-256 key as 64-character hex string
- name: iv
in: query
required: true
schema:
type: string
description: IV as 24-character hex string
- name: aad
in: query
schema:
type: string
description: Additional Authenticated Data (must match encryption)
responses:
'200':
description: AES decryption result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
algorithm:
type: string
example: AES-256-GCM
plaintext:
type: string
plaintext_length:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
/v1/rsa-crypt:
get:
tags:
- Security Utils
summary: RSA encrypt/decrypt/keygen
description: Generates RSA key pairs (2048/4096 bit) or encrypts/decrypts data using RSA-OAEP with SHA-256. Key generation returns hex and PEM formats.
operationId: rsaCrypt
security:
- ApiKeyAuth: []
parameters:
- name: mode
in: query
required: true
schema:
type: string
enum:
- generate
- encrypt
- decrypt
description: Operation mode
- name: input
in: query
schema:
type: string
description: Plaintext (mode=encrypt) or hex ciphertext (mode=decrypt)
- name: public_key
in: query
schema:
type: string
description: Public key hex (required for mode=encrypt)
- name: private_key
in: query
schema:
type: string
description: Private key hex (required for mode=decrypt)
- name: key_size
in: query
schema:
type: integer
default: 2048
enum:
- 2048
- 4096
description: Key size in bits
responses:
'200':
description: RSA operation result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
mode:
type: string
algorithm:
type: string
example: RSA-OAEP-256
key_size:
type: integer
public_key:
type: string
public_key_pem:
type: string
private_key:
type: string
private_key_pem:
type: string
ciphertext:
type: string
plaintext:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/crc32:
get:
tags:
- Security Utils
summary: CRC32 checksum
description: Computes the CRC32 checksum of an input string. Returns the unsigned decimal, signed integer, and hex representations.
operationId: computeCrc32
security:
- ApiKeyAuth: []
parameters:
- name: input
in: query
required: true
schema:
type: string
description: Text to compute CRC32 for
responses:
'200':
description: CRC32 result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
input_length:
type: integer
crc32_hex:
type: string
crc32_decimal:
type: integer
crc32_signed:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
/v1/secure-compare:
get:
tags:
- Security Utils
summary: Constant-time string compare
description: Compares two strings in constant time to prevent timing attacks. Supports hex, base64, and UTF-8 encodings.
operationId: secureCompare
security:
- ApiKeyAuth: []
parameters:
- name: a
in: query
required: true
schema:
type: string
description: First input string
- name: b
in: query
required: true
schema:
type: string
description: Second input string
- name: encoding
in: query
schema:
type: string
default: utf8
enum:
- utf8
- hex
- base64
description: Input encoding
responses:
'200':
description: Secure comparison result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
match:
type: boolean
a_length:
type: integer
b_length:
type: integer
a_bytes:
type: integer
b_bytes:
type: integer
equal_length:
type: boolean
method:
type: string
timing_safe:
type: boolean
example: true
note:
type: string
'400':
$ref: '#/components/responses/BadRequest'
/v1/sha3:
get:
tags:
- Security Utils
summary: SHA-3 hash (224/256/384/512)
operationId: v1_sha3
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/blake2:
get:
tags:
- Security Utils
summary: BLAKE2b hash / keyed MAC (256/512)
operationId: v1_blake2
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/otp:
get:
tags:
- Security Utils
summary: HOTP/TOTP one-time password generator
operationId: v1_otp
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/password-entropy:
get:
tags:
- Security Utils
summary: Password strength / entropy analysis
operationId: v1_password_entropy
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/random-token:
get:
tags:
- Security Utils
summary: CSPRNG random token generator
operationId: v1_random_token
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/entropy-check:
get:
tags:
- Security Utils
summary: Entropy / randomness statistical check
operationId: v1_entropy_check
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
security:
- ApiKeyAuth: []
/v1/register:
post:
tags:
- Security Utils
summary: Register an agent, get a free API key
operationId: v1_register
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
get:
tags:
- Security Utils
summary: Agent onboarding info (no key created)
operationId: getV1Register
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
x-operation-id-source: normalized
x-operation-id-original: v1_register
components:
responses:
BadRequest:
description: Bad request — missing or invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
ErrorResponse:
type: object
required:
- error
- message
properties:
error:
type: boolean
example: true
message:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: 'API key authentication. Provide via X-API-Key header or Authorization: Bearer <key> header.'
X402Payment:
type: apiKey
in: header
name: X-PAYMENT
description: x402 pay-per-call payment. Send base64url(JSON) of the x402 payment payload in X-PAYMENT (or PAYMENT-SIGNATURE). No account or API key needed. Call the endpoint once without credentials and the 402 response tells you the exact price, network, asset and payTo address to pay.
x-refined-from:
- laminarforge-dev-openapi.json
- laminarforge-dev-openapi.json