JSON Web Token (JWT) Explained With Java jjwt Examples
Learn how a JSON Web Token (JWT) works, create and validate one with jjwt 0.13 and nimbus-jose-jwt, and avoid the storage, key and expiry mistakes.
Learn how a JSON Web Token (JWT) works, create and validate one with jjwt 0.13 and nimbus-jose-jwt, and avoid the storage, key and expiry mistakes.
Java EdDSA example with Ed25519 and Ed448. Generate keys, sign and verify messages, save and load keys, and compare EdDSA with ECDSA, RSA and ML-DSA.
Secure random number generation in Java with SecureRandom. Create tokens and codes, pick NativePRNG, DRBG or getInstanceStrong and avoid seeding mistakes.
Fix InvalidKeyException Parameters missing by passing the IV to Cipher.init(), with AES-GCM IV storage and InvalidAlgorithmParameterException causes.
Java AES encryption and decryption with AES-256-GCM, random IVs, key storage, PBKDF2 and HKDF keys, file encryption, tamper detection and common mistakes.
Bypass SSL certificate checking in Java only in local tests, and fix PKIX errors safely with a truststore, a trusted PEM certificate or Spring SSL bundles.
A current REST API security checklist with OAuth 2.1, JWT validation, TLS, authorization checks, input validation, rate limiting and OWASP API Top 10.
Java file checksum examples for MD5 and SHA-256 with MessageDigest, streaming for large files, HexFormat, Guava, Commons Codec and verifying downloads.
Java password hashing done right with PBKDF2, bcrypt, scrypt and Argon2id, OWASP parameters, salts, real timings, and why MD5 and SHA-256 fail.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.