Python generates a pair of RSA keys and saves the public and private keys as .pem files respectively. Use the public key in the generated RSA key pair to encrypt the data, and then use the private key to decrypt. Convert RSA’s public key exponent (E) and modulus (N) to .pem format

You can use the cryptography library to generate a pair of RSA keys and save the public and private keys as .pem files respectively. Here is a sample code: from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa # Generate RSA key pair private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048, backend=default_backend() ) # Get […]

[Maven]–Module splitting, aggregation, inheritance, attributes, private server

1. Module development and design Split each layer into a module and then modify the corresponding configuration file Compile each module [compile] and install [install] to the local warehouse Where needed, import it as a dependency in the pom.xml file SSM_pojo split Create a new module [no need to add a template] Copy the corresponding […]

Docker deploys Nexus Maven private library

Docker deploys Nexus Maven private library Environment: Operating system: Linux Centos8 docker version: 20.10.23 docker image: REPOSITORY TAG IMAGE ID CREATED SIZE sonatype/nexus3 latest 589f7296a4a2 22 months ago 655MB Nexus official website: https://www.sonatype.com/nexus-repository-oss Effect Steps 1. Pull the image Command: docker pull docker.io/sonatype/nexus3 Output: Using default tag: latest latest: Pulling from sonatype/nexus3 26f1167feaf7: Pull complete […]

[Git] Gui graphical management, SSH protocol private library integrated with IDEA use

1. Using Gui graphical interface 1. Open the manager according to your needs 2. Clone an existing library 3. Introduction to graphical interface 1. First update a code file in the local warehouse and use it: 2. Enter the graphical management interface to refresh code resources: 3. Click Stage changed to track the file and […]

How to convert public and private keys to keystore

Step 1: Generate Keystore package keyTools; import java.io.FileOutputStream; import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.KeyStore; import java.security.Provider; import java.security.Provider.Service; import java.security.Security; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Date; import java.util.Iterator; import java.util.Set; import org.bouncycastle.jce.X509Principal; import org.bouncycastle.x509.X509V3CertificateGenerator; public class PKCS12KeyStoreExample {<!– –> public static void genP12() {<!– –> try {<!– –> // Generate key pair KeyPairGenerator […]

Gitlab private warehouse is deployed again (3)

Reference article GitLab download and installation_GitLab latest Chinese basic version download and installation-Jihu GitLab Gitlab warehouse construction (detailed version) Completely uninstall gitlab on CentOS_51CTO blog_centos uninstall Simple and easy! Tutorial for installing GitLab Community Edition on CentOS 7_Justice Chaplin’s Blog-CSDN Blog MobaXterm connects to the remote server and uses the Linux command line to upload […]

Centos7 installs Docker, installs DockerCompose (clustered deployment), Docker private image warehouse

0. Install Docker Docker is divided into two major versions: CE and EE. CE is the community edition (free, support period is 7 months), EE is the enterprise edition, which emphasizes security, is paid for use, and has a support period of 24 months. Docker CE is divided into three update channels: stable test and […]

Nexus 3 builds a private maven warehouse

1. Install and use Nexus 3 1: Download address: https://help.sonatype.com/repomanager3/product-information/download After Windows decompression: 2: Enter the /nexus-3.61.0-02/bin directory, start the cmd command to open the command window, and enter nexus /run and wait for startup h4> 3: The default request address after startup is completed: http://localhost:8081/ Default account password: admin / admin123 Interface display: 4: […]