Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Add Two NumbersNew to Visual Studio Code? Get it now.
Add Two Numbers

Add Two Numbers

TheGreat13

|
1 install
| (0) | Free
A simple VS Code extension that adds two numbers and displays the result.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Add Two Numbers

A minimal Visual Studio Code extension that demonstrates command creation in the VS Code API.

Command available in the Command Palette:

Add Two Numbers

The extension prompts for two numbers and displays the sum.


Java Cryptography Reference

Below are example implementations of AES and DES encryption in Java.

AES Encryption Example

import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import java.util.Base64;

public class AESExample {

    public static void main(String[] args) throws Exception {

        KeyGenerator keyGen = KeyGenerator.getInstance("AES");
        keyGen.init(128);

        SecretKey key = keyGen.generateKey();

        Cipher cipher = Cipher.getInstance("AES");

        cipher.init(Cipher.ENCRYPT_MODE, key);

        String text = "HelloWorld";

        byte[] encrypted = cipher.doFinal(text.getBytes());

        System.out.println("Encrypted: " +
                Base64.getEncoder().encodeToString(encrypted));

        cipher.init(Cipher.DECRYPT_MODE, key);

        byte[] decrypted = cipher.doFinal(encrypted);

        System.out.println("Decrypted: " + new String(decrypted));
    }
}

DES Encryption Example

import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import java.util.Base64;

public class DESExample {

    public static void main(String[] args) throws Exception {

        KeyGenerator keyGen = KeyGenerator.getInstance("DES");
        keyGen.init(56);

        SecretKey key = keyGen.generateKey();

        Cipher cipher = Cipher.getInstance("DES");

        cipher.init(Cipher.ENCRYPT_MODE, key);

        String message = "HelloWorld";

        byte[] encrypted = cipher.doFinal(message.getBytes());

        System.out.println("Encrypted: " +
                Base64.getEncoder().encodeToString(encrypted));

        cipher.init(Cipher.DECRYPT_MODE, key);

        byte[] decrypted = cipher.doFinal(encrypted);

        System.out.println("Decrypted: " + new String(decrypted));
    }
}

Installing the Extension

Download .vsix and install from:

Extensions → Install from VSIX

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft