Java Cryptography Basics

Su Suriya Ravichandran Updated 18 Nov 2026
11 min read ·Lesson 245 of 306

Java cryptography lets you protect data so that others cannot read it, change it without being noticed, or pretend to be someone else. The JDK includes everything you need for the common tasks: hashing, message authentication codes (HMAC), encryption and digital signatures.

This lesson explains each building block in plain terms and shows how to use it with the standard java.security and javax.crypto APIs. It ends with a real-world example that encrypts notes with a password using PBKDF2 and AES-GCM. If you have not read it yet, Java Security explains how providers and getInstance work.


Java Cryptography Terms You Need to Know

TermMeaning
PlaintextThe original readable data
CiphertextThe scrambled data after encryption
KeySecret value that controls encryption, decryption or signing
IV / nonceRandom value used once per encryption so equal messages encrypt differently
HashFixed-size fingerprint of data; cannot be reversed
MACHash that also needs a secret key; proves data was not changed
Digital signatureCreated with a private key, checked with a public key; proves who sent the data

The building blocks solve different problems, so the first step is always to pick the right one.

GoalBuilding blockJava classAlgorithm to use
Detect accidental changesHashMessageDigestSHA-256
Detect deliberate changes (shared key)MACMacHmacSHA256
Keep data secretSymmetric encryptionCipherAES/GCM/NoPadding
Prove who created dataDigital signatureSignatureEd25519 or ECDSA
Turn a password into a keyKey derivationSecretKeyFactoryPBKDF2WithHmacSHA256

Encoding Is Not Encryption

Base64 turns bytes into printable text. It is useful for storing and sending binary data, but it hides nothing, because anyone can decode it without a key.

import java.nio.charset.StandardCharsets;
import java.util.Base64;

public class Base64NotEncryption {
    public static void main(String[] args) {
        String apiKey = "sk-live-12345";
        String encoded = Base64.getEncoder().encodeToString(apiKey.getBytes(StandardCharsets.UTF_8));
        System.out.println("Encoded: " + encoded);

        // Anyone can reverse Base64 without any key
        String decoded = new String(Base64.getDecoder().decode(encoded), StandardCharsets.UTF_8);
        System.out.println("Decoded: " + decoded);
    }
}

Output:

Encoded: c2stbGl2ZS0xMjM0NQ==
Decoded: sk-live-12345

How it works:

  • Base64.getEncoder() converts the bytes of the key to text using 64 safe characters.
  • Base64.getDecoder() reverses it immediately. There is no secret involved, so Base64 offers no protection.

Note: You will still use Base64 in almost every crypto program. Keys, ciphertext and signatures are raw bytes, and Base64 is how you store them in a text file, a database column or a JSON field.


Hashing Data With SHA-256

A cryptographic hash turns any amount of data into a fixed-size value. The same input always gives the same hash, but a tiny change gives a completely different one, and you cannot get the input back from the hash.

import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;

public class HashingExample {
    static String sha256Hex(String text) throws Exception {
        MessageDigest digest = MessageDigest.getInstance("SHA-256");
        byte[] hash = digest.digest(text.getBytes(StandardCharsets.UTF_8));
        return HexFormat.of().formatHex(hash);
    }

    public static void main(String[] args) throws Exception {
        System.out.println(sha256Hex("Pay Ravi 500"));
        System.out.println(sha256Hex("Pay Ravi 500"));   // same input -> same hash
        System.out.println(sha256Hex("Pay Ravi 900"));   // one character changed -> completely different
        System.out.println("Length: " + sha256Hex("any text at all, short or very long").length() + " hex chars (256 bits)");
    }
}

Output:

8e7ba99fefbd1bbae8aa57a0e7bf945d0cdaba487eb6ac325764c53d60029783
8e7ba99fefbd1bbae8aa57a0e7bf945d0cdaba487eb6ac325764c53d60029783
a47e0df8f614ea0738e865dfca3cd29a21cb6f62b03f2674eb5412df3f03db10
Length: 64 hex chars (256 bits)

How it works:

  • MessageDigest.getInstance("SHA-256") gets a SHA-256 implementation, and digest returns 32 bytes.
  • The first two lines are identical, so a hash works as a fingerprint for checking downloads or detecting duplicate files.
  • Changing 500 to 900 changes the whole hash. This "avalanche effect" makes it impossible to adjust data to match a chosen hash.

Note: A plain hash only detects accidental changes. An attacker who changes the message can simply compute a new hash. For passwords, use a slow salted hash as shown in Java Password Hashing.


Message Authentication With HMAC

An HMAC combines a hash with a secret key. Only someone who has the key can produce the correct tag, so the receiver knows the message really came from a key holder and was not changed. Payment gateways and webhooks use HMAC signatures for exactly this.

import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

public class HmacExample {
    static byte[] hmac(byte[] key, String message) throws Exception {
        Mac mac = Mac.getInstance("HmacSHA256");
        mac.init(new SecretKeySpec(key, "HmacSHA256"));
        return mac.doFinal(message.getBytes(StandardCharsets.UTF_8));
    }

    public static void main(String[] args) throws Exception {
        // A fixed demo key; real keys come from a KeyGenerator or a secrets store
        byte[] sharedKey = "demo-key-shared-by-server-and-app".getBytes(StandardCharsets.UTF_8);
        String message = "order=1042&amount=1499";

        byte[] tag = hmac(sharedKey, message);
        System.out.println("Message: " + message);
        System.out.println("HMAC   : " + HexFormat.of().formatHex(tag));

        // The receiver recomputes the tag and compares in constant time
        System.out.println("Original verifies? " + MessageDigest.isEqual(tag, hmac(sharedKey, message)));
        System.out.println("Tampered verifies? " + MessageDigest.isEqual(tag, hmac(sharedKey, "order=1042&amount=1")));
        byte[] wrongKey = "attacker-guess".getBytes(StandardCharsets.UTF_8);
        System.out.println("Wrong key verifies? " + MessageDigest.isEqual(tag, hmac(wrongKey, message)));
    }
}

Output:

Message: order=1042&amount=1499
HMAC   : fc74284c6d5c8d399712ab3f42a2b7af218c2212deb9a64dd2db217830646531
Original verifies? true
Tampered verifies? false
Wrong key verifies? false

How it works:

  • SecretKeySpec wraps the raw key bytes, and Mac.init loads the key into the HMAC engine.
  • doFinal returns a 32-byte tag for the message. The sender sends the message and the tag together.
  • The receiver computes the tag again with its own copy of the key. A changed amount or a wrong key gives a different tag.
  • MessageDigest.isEqual compares the tags in constant time, which avoids timing attacks.

Encrypting Data With AES-GCM in Java

AES is the standard symmetric cipher: the same key encrypts and decrypts. Always use it in GCM mode, which encrypts the data and adds an authentication tag, so any change to the ciphertext is detected during decryption.

SettingValueWhy
TransformationAES/GCM/NoPaddingAuthenticated encryption; GCM needs no padding
Key size256 bitsStrong and fast on modern CPUs
IV12 random bytes, new for every messageReusing an IV with the same key breaks GCM
Tag length128 bitsFull-strength integrity check
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import javax.crypto.AEADBadTagException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;

public class AesGcmExample {
    private static final int IV_BYTES = 12;       // 96-bit nonce, the standard size for GCM
    private static final int TAG_BITS = 128;      // authentication tag size

    public static void main(String[] args) throws Exception {
        // 1. Create a random 256-bit AES key
        KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
        keyGenerator.init(256);
        SecretKey key = keyGenerator.generateKey();

        // 2. Create a fresh random IV for this message
        byte[] iv = new byte[IV_BYTES];
        new SecureRandom().nextBytes(iv);

        // 3. Encrypt
        String plaintext = "Student marks: Asha=91, Ravi=84";
        Cipher encryptCipher = Cipher.getInstance("AES/GCM/NoPadding");
        encryptCipher.init(Cipher.ENCRYPT_MODE, key, new GCMParameterSpec(TAG_BITS, iv));
        byte[] ciphertext = encryptCipher.doFinal(plaintext.getBytes(StandardCharsets.UTF_8));
        System.out.println("Plaintext bytes : " + plaintext.length());
        System.out.println("Ciphertext bytes: " + ciphertext.length + " (data + 16-byte tag)");

        // 4. Decrypt with the same key and IV
        Cipher decryptCipher = Cipher.getInstance("AES/GCM/NoPadding");
        decryptCipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(TAG_BITS, iv));
        System.out.println("Decrypted: " + new String(decryptCipher.doFinal(ciphertext), StandardCharsets.UTF_8));

        // 5. Change one bit of the ciphertext: GCM detects it
        ciphertext[5] ^= 1;
        try {
            decryptCipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(TAG_BITS, iv));
            decryptCipher.doFinal(ciphertext);
        } catch (AEADBadTagException e) {
            System.out.println("Tampering detected: " + e.getMessage());
        }
    }
}

Output:

Plaintext bytes : 31
Ciphertext bytes: 47 (data + 16-byte tag)
Decrypted: Student marks: Asha=91, Ravi=84
Tampering detected: Tag mismatch

How it works:

  1. KeyGenerator creates a random 256-bit AES key. In a real application you would store it in a key store or a secrets manager.
  2. SecureRandom fills a new 12-byte IV. The IV is not secret; it is stored or sent next to the ciphertext.
  3. Cipher.getInstance("AES/GCM/NoPadding") and init(ENCRYPT_MODE, ...) prepare encryption. The ciphertext is the plaintext length plus a 16-byte tag.
  4. Decryption uses the same key and IV and returns the original text.
  5. Flipping a single bit makes doFinal throw AEADBadTagException. GCM never returns tampered data.

Note: Never use Cipher.getInstance("AES") without a mode. The JDK then uses AES/ECB/PKCS5Padding, and ECB mode encrypts equal blocks to equal output, which leaks patterns in your data.


Digital Signatures With Ed25519

Asymmetric cryptography uses a key pair. The private key is kept secret and creates signatures; the public key can be shared with everyone and only verifies them. This lets anyone check that a document came from you without being able to fake your signature.

import java.nio.charset.StandardCharsets;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Signature;

public class SignatureExample {
    static byte[] sign(PrivateKey privateKey, String document) throws Exception {
        Signature signer = Signature.getInstance("Ed25519");
        signer.initSign(privateKey);
        signer.update(document.getBytes(StandardCharsets.UTF_8));
        return signer.sign();
    }

    static boolean verify(PublicKey publicKey, String document, byte[] signature) throws Exception {
        Signature verifier = Signature.getInstance("Ed25519");
        verifier.initVerify(publicKey);
        verifier.update(document.getBytes(StandardCharsets.UTF_8));
        return verifier.verify(signature);
    }

    public static void main(String[] args) throws Exception {
        // GOCOURSE signs certificates with its private key
        KeyPair gocourseKeys = KeyPairGenerator.getInstance("Ed25519").generateKeyPair();
        String certificate = "Certificate: Asha completed Java Security";
        byte[] signature = sign(gocourseKeys.getPrivate(), certificate);
        System.out.println("Signature size: " + signature.length + " bytes");
        System.out.println("Public key algorithm: " + gocourseKeys.getPublic().getAlgorithm());

        // Anyone with the public key can check it
        System.out.println("Genuine certificate valid? " + verify(gocourseKeys.getPublic(), certificate, signature));
        System.out.println("Edited certificate valid?  "
                + verify(gocourseKeys.getPublic(), "Certificate: Ravi completed Java Security", signature));

        // A signature from someone else's key does not verify
        KeyPair fakeKeys = KeyPairGenerator.getInstance("Ed25519").generateKeyPair();
        byte[] forged = sign(fakeKeys.getPrivate(), certificate);
        System.out.println("Forged signature valid?    " + verify(gocourseKeys.getPublic(), certificate, forged));
    }
}

Output:

Signature size: 64 bytes
Public key algorithm: EdDSA
Genuine certificate valid? true
Edited certificate valid?  false
Forged signature valid?    false

How it works:

  • KeyPairGenerator.getInstance("Ed25519") (Java 15+) creates a modern elliptic-curve key pair. getAlgorithm() reports the family name, EdDSA.
  • sign uses the private key. Ed25519 signatures are always 64 bytes.
  • verify uses only the public key. Changing the name in the certificate makes verification fail.
  • A signature made with a different private key fails too, so nobody can issue fake certificates without GOCOURSE's private key.

Note: Signatures do not hide the data; the certificate text is still readable. If you need both secrecy and proof of origin, encrypt the data and sign it.


Real-World Example: Password-Protected Secret Notes

This example encrypts a note with a password the user remembers. The password is turned into an AES key with PBKDF2, the note is encrypted with AES-GCM, and the salt, IV and ciphertext are packed into one Base64 token that can be saved anywhere.

import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Base64;
import javax.crypto.AEADBadTagException;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;

public class SecretNotes {
    private static final byte VERSION = 1;
    private static final int SALT_BYTES = 16;
    private static final int IV_BYTES = 12;
    private static final int TAG_BITS = 128;
    private static final int ITERATIONS = 600_000;
    private static final SecureRandom RANDOM = new SecureRandom();

    // Turn a password into a 256-bit AES key
    private static SecretKey deriveKey(char[] password, byte[] salt) throws Exception {
        PBEKeySpec spec = new PBEKeySpec(password, salt, ITERATIONS, 256);
        try {
            byte[] keyBytes = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256").generateSecret(spec).getEncoded();
            return new SecretKeySpec(keyBytes, "AES");
        } finally {
            spec.clearPassword();
        }
    }

    // Output layout: version(1) | salt(16) | iv(12) | ciphertext+tag
    static String encrypt(String note, char[] password) throws Exception {
        byte[] salt = new byte[SALT_BYTES];
        byte[] iv = new byte[IV_BYTES];
        RANDOM.nextBytes(salt);
        RANDOM.nextBytes(iv);

        Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
        cipher.init(Cipher.ENCRYPT_MODE, deriveKey(password, salt), new GCMParameterSpec(TAG_BITS, iv));
        cipher.updateAAD(new byte[] {VERSION});            // the header is authenticated too
        byte[] ciphertext = cipher.doFinal(note.getBytes(StandardCharsets.UTF_8));

        ByteBuffer packed = ByteBuffer.allocate(1 + SALT_BYTES + IV_BYTES + ciphertext.length);
        packed.put(VERSION).put(salt).put(iv).put(ciphertext);
        return Base64.getEncoder().encodeToString(packed.array());
    }

    static String decrypt(String token, char[] password) throws Exception {
        ByteBuffer packed = ByteBuffer.wrap(Base64.getDecoder().decode(token));
        byte version = packed.get();
        if (version != VERSION) {
            throw new IllegalArgumentException("Unsupported format version " + version);
        }
        byte[] salt = new byte[SALT_BYTES];
        byte[] iv = new byte[IV_BYTES];
        packed.get(salt).get(iv);
        byte[] ciphertext = new byte[packed.remaining()];
        packed.get(ciphertext);

        Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
        cipher.init(Cipher.DECRYPT_MODE, deriveKey(password, salt), new GCMParameterSpec(TAG_BITS, iv));
        cipher.updateAAD(new byte[] {version});
        return new String(cipher.doFinal(ciphertext), StandardCharsets.UTF_8);
    }

    public static void main(String[] args) throws Exception {
        char[] password = "Masala-Dosa-Sunday".toCharArray();
        String note = "Wi-Fi password for the lab: GoCourse@2026";

        String token = encrypt(note, password);
        System.out.println("Token length: " + token.length() + " chars (Base64)");
        System.out.println("Same note encrypted twice, same token? " + token.equals(encrypt(note, password)));
        System.out.println("Decrypted: " + decrypt(token, password));

        try {
            decrypt(token, "masala-dosa-sunday".toCharArray());
        } catch (AEADBadTagException e) {
            System.out.println("Wrong password: decryption refused");
        }

        byte[] damaged = Base64.getDecoder().decode(token);
        damaged[damaged.length - 1] ^= 1;
        try {
            decrypt(Base64.getEncoder().encodeToString(damaged), password);
        } catch (AEADBadTagException e) {
            System.out.println("Damaged token: decryption refused");
        }
        Arrays.fill(password, '\0');
    }
}

Output:

Token length: 116 chars (Base64)
Same note encrypted twice, same token? false
Decrypted: Wi-Fi password for the lab: GoCourse@2026
Wrong password: decryption refused
Damaged token: decryption refused

How it works:

  1. Key derivation. A password is not a key. deriveKey runs PBKDF2 with a random salt and 600,000 iterations to produce 32 key bytes, the same technique used for password hashing.
  2. Fresh salt and IV. Every call to encrypt creates a new salt and IV, so encrypting the same note twice gives two different tokens.
  3. Authenticated header. updateAAD adds the version byte to the GCM tag without encrypting it. If someone changes the version, decryption fails, and the version lets you change the format safely later.
  4. Packing. ByteBuffer writes the version (1 byte), salt (16), IV (12) and ciphertext with tag into one array, and Base64 turns it into text. Decryption reads the parts back in the same order.
  5. Wrong password or damage. A password with a different letter case produces a different key, and a flipped bit changes the ciphertext. In both cases GCM's tag check fails with AEADBadTagException, so the program never shows wrong or tampered text.
  6. Clean up. The password char[] is wiped at the end, and clearPassword() wipes the copy inside PBEKeySpec.

Note: Java 25 added a standard Key Derivation Function API (javax.crypto.KDF, JEP 510) with HKDF support. HKDF derives several keys from one strong secret, such as a shared TLS secret. For keys made from human passwords, a slow function such as PBKDF2 or Argon2 is still the right choice.

0 Comments

Reviewed before they appear

No comments yet.

Java
Java Introduction Java Features Java Syntax Java Comments Java Statements Java Output Java Variables Java Data Types Java Type Casting Java Operators Java Strings Java Numbers Java Math Java Booleans Java User Input Java Conditions Java If Else Java Switch Java While Loop Java For Loop Java Break Java Continue Java Arrays Java Methods Java Parameters Java Return Values Java Scope Java Recursion Install Java Install JDK Java IDEs Java JDK Java JRE Java JVM Java Compiler Java File Compile Java Run Java JShell Basics Java Packages Java OOP Java Classes Java Objects Class Methods Constructors Constructor Overload this Keyword static Keyword final Keyword Encapsulation Inheritance Polymorphism Abstraction Access Modifiers super Keyword Method Overload Method Override Instanceof Operator Nested Classes Inner Classes Anonymous Classes Enums Records Array Basics Array Length Loop Arrays Multidimensional Arrays Array Copy Array Sorting Array Search ArrayList LinkedList HashSet TreeSet HashMap TreeMap Queue Interface Deque Interface Stack Class Iterator List Interface Set Interface Map Interface Collections Class Comparable Comparator Generics Basics Generic Classes Generic Methods Wildcards String Basics String Length String Methods String Concatenation String Compare String Search String Replace String Split String Format StringBuilder StringBuffer Text Blocks Regular Expressions Number Types Integer Class Float Class Double Class BigInteger BigDecimal Math Class Random Numbers Number Format Date Basics LocalDate LocalTime LocalDateTime ZonedDateTime Date Formatting Date Parsing Period Class Duration Class Java Instant Class Java Exception Basics Java try...catch Java Multiple Catch Blocks Java finally Block Java throw Keyword Java throws Keyword Java Checked Exceptions Java Unchecked Exceptions Java Custom Exceptions Java try-with-resources Java Exception Chaining Java File Basics Java Create Files Java Read Files Java Write Files Java Delete Files Java File Paths Java File Class Java BufferedReader Java BufferedWriter Java FileInputStream Java FileOutputStream Java Object Streams Java Directory Handling Java NIO Basics Java Files API Java Input Java Scanner Class Java Console Input Java PrintStream Java InputStream Java OutputStream Java Reader Class Java Writer Class Java Buffered Streams Java Data Streams Java Generics Introduction Java Generic Types Java Generic Methods Java Bounded Types Java Wildcards Java Type Erasure Java Generic Interfaces Java Generic Collections Java Lambda Basics Java Lambda Syntax Java Functional Interfaces Java Method References Java Stream API Java Stream Creation Java Stream Filter Java Stream Map Java Stream Reduce Java Stream Sort Java Stream Collect Java Collectors Class Java Optional Class Java Parallel Streams Java Threads: Thread Basics Create a Thread in Java Java Thread Class Java Runnable Interface Java Thread States Java Thread Sleep Java Thread Join Java Thread Priority Java Synchronization Java Thread Safety Java Race Conditions Java Deadlocks Java Executor Service Java Thread Pools Java Callable Interface Java Future Interface Java CompletableFuture Java Concurrent Collections Java Atomic Classes Java Virtual Threads Java Networking Basics Java URL Class Java URI Class Java HttpClient Java HTTP Requests Java HTTP Responses Java Socket Basics Java ServerSocket Java DatagramSocket Java WebSocket Basics Java JDBC Basics Java JDBC Setup Java Database Connection Java JDBC Connection Interface Java JDBC Statement Java PreparedStatement Java ResultSet Java JDBC CRUD Operations Java JDBC Transactions Java JDBC Batch Update Java Connection Pooling with HikariCP Java JPA Basics: Entities, EntityManager and JPQL Java Hibernate Basics: SessionFactory, Session and HQL Package in Java: Basics Explained with Examples Create Package in Java: Step-by-Step Guide with Examples Import Package in Java: The import Statement Explained Access Control in Java: Packages, Classes and Members JAR File in Java: Create, Run and Inspect JAR Files Java Modules: Introduction to the Java Module System module-info in Java: Every Module Directive Explained Java Module Path: How --module-path Finds Your Modules Java Classpath: How -cp and CLASSPATH Find Your Classes Java Annotations: Basics of @ Metadata in Java Java Built-in Annotations: @Override, @Deprecated and More Java Custom Annotations: Create Your Own @interface Java Annotation Targets: @Target and ElementType Explained Java Reflection API: Inspect and Use Classes at Runtime Java Class Metadata: Names, Modifiers, Hierarchy and Generic Java Dynamic Objects: Create Objects Dynamically With Reflec Java Dynamic Proxy: Intercept Method Calls With Proxy and In Java Security Java Secure Coding Java Password Hashing Java Input Validation Java Cryptography Basics Java KeyStore Basics Java TLS Basics Java SecureRandom Java JUnit Basics Java JUnit Test Methods JUnit Assertions JUnit Test Fixtures JUnit Parameterized Tests Mockito in Java Java Mock Objects Java Integration Testing Java Code Coverage Maven in Java Create a Maven Project in Java Maven Dependencies Maven Plugins Gradle in Java Gradle Build Gradle Dependencies Build Executable JAR in Java Build WAR File in Java HTTP Basics in Java Java Servlet Basics Servlet Lifecycle in Java HttpServletRequest in Java HttpServletResponse in Java JSP in Java JSTL in JSP REST API in Java JSON in Java Java Web Application Spring Framework Basics Spring Boot Tutorial Spring MVC Spring Data JPA Spring Security Spring Boot REST API Jakarta EE Basics Java Deployment JAR Deployment Java WAR Deployment Run Java as a Service Docker Java: Dockerize a Java Application Java Environment Variables and Configuration Java Logging Basics Java Production Setup Java JVM Options Java JVM Monitoring Java Hello World App Java Calculator App Java Number Guess Game Java Student Manager Java Library System Java Bank App Java Todo App Java File Manager Java Quiz App Java REST API Project Java Chat Server Java Employee Manager Java E-commerce API
Ask about this post
AI Ask about this post

Ask questions about Java Cryptography Basics and get answers drawn from it.

Signed-in readers only.