Learn everything you need to know about java.security.UnrecoverableKeyException – what causes it and how to fix it.
Search Results for: java.security
The java.security.egd JVM Option
The java.security.egd JVM startup property affects how the SecureRandom class initializes. Let’s explore how changing its value impacts our code.
Generating Unique Positive Long Using SecureRandom in Java
Learn how to use SecureRandom to generate unique positive values in Java.
Securing Spring Boot 3 Applications With SSL Bundles
Explore the new SSL Bundles feature of Spring Boot 3 and learn how it can streamline SSL configuration tasks for Spring Boot applications.
Check if Certificate Is Self-Signed or CA-Signed With Java
Learn how to determine if a certificate is self-signed or signed by a trusted Certificate Authority (CA).
Custom DLL Load – Fixing the “java.lang.UnsatisfiedLinkError” Error
Explore common causes like incorrect library names, missing directory specifications, and incompatible architectures. Implement solutions such as setting java.library.path and using proper classloaders to resolve this error effectively.
Hex Representation of a SHA-1 Digest of a String in Java
Learn three different ways to generate the hex representation of a SHA-1 digest of a string in Java.
Common Exceptions of Crypto APIs in Java
A quick and practical guide to some common exceptions that can occur while working with encryption in Java.
TLS Setup in MySQL and Spring Boot Application
Learn how to enable a secure connection on a MySQL server.
Generate the MD5 Checksum for a File in Java
A quick and practical guide to generating the MD5 checksum for files in Java.
Java HttpClient With SSL
Learn how to use the Java HttpClient to connect to HTTPS URLs and also find out how to bypass certificate verification in non-production environments.
Error: “trustAnchors parameter must be non-empty”
Learn the reasons for the error: “java.security.InvalidAlgorithmParameterException: trustAnchors parameter must be non-empty” and how to fix it
Javadoc: @see, @link, and @inheritDoc
A comparison between the @see and @link Javadoc annotations.
Generating a Secure AES Key in Java
A quick and practical guide to generating a secure AES key in Java.
Trusting All Certificates in OkHttp
Learn how to create an OkHttpClient and configure it to trust all certificates — not the best practice in production, but you may need it from time to time during development or testing.
Trusting a Self-Signed Certificate in OkHttp
Learn how to configure an OkHttpClient to trust self-signed certificates
The java.lang.NoClassDefFoundError in JUnit
In this article, we’ll understand why the java.lang.NoClassDefFoundError occurs in JUnit and how to fix it.
RSA in Java
Learn how to create RSA keys in Java and how to use them to encrypt and decrypt messages and files.
InvalidAlgorithmParameterException: Wrong IV Length
In this tutorial, we’ll describe how to avoid InvalidAlgorithmParameterException when we generate the IV and use it in a cipher algorithm.
Get a List of Trusted Certificates in Java
Learn how to read a list of trusted certificates in Java through quick and practical examples