Implementation code of AES/ECB/PKCS5Padding algorithm for secret key encryption and decryption of any length consistent with JAVA, Python and PHP

Recently, I encountered an AES encryption algorithm that needs to be implemented in Java, Python, and PHP. In fact, it is not very complicated in nature, but the parameter adjustment is quite troublesome. I found some reference materials and finally got it. The actual code is as follows: Main features The three languages of JAVA, […]

Solve the problem that the Onlyoffice file version changes and the problem that multiple people cannot edit collaboratively after using dynamic keys

1.Cause analysis Onlyoffice’s file saving mechanism relies on the callback interface to save files. Once the file is saved successfully. When the editor is opened again with the last key and the latest document URL address as parameters, the editor service goes to redis to find the cache based on the key and verifies whether […]

Build a keyword-driven automated testing framework

Preface In the last article, we have learned how the data-driven automated testing framework builds and drives tests! So in this article we will learn how keyword-driven testing drives automated testing to complete the entire testing process. Keyword-driven framework is a functional automation testing framework, which is also known as table-driven testing or action word-based […]

Application example of upgrading related functions based on ESP32 development board using MiSiQi application WIFI (key/advanced)+EEPROM+MQTT+OTA

I am an amateur electronics enthusiast and can use Chinese programming such as Yi Language and e4a. I have recently played with several microcontroller development boards and used MiSiQi for programming. I found that MiSiQi is good at simple programming but has more complex functions. Programming is difficult to use, especially for friends like me […]

Solving python keyerror(0)

Table of Contents Resolving Python KeyError(0) errors wrong reason Solution 1. Check the keys in the dictionary 2. Use the get() method 3. Use the try-except statement Summarize Sample code Dictionary Features Create dictionary 1. Use curly braces {} and colon: to define key-value pairs 2. Use the built-in dict()function Dictionary access and operations Get […]

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 […]

Linux-Vim shortcut keys

Vim key arrangement space bar Enter represents the key combination of and f Write, save, exit :q[uit] “Exit :q! ” Force quit :w[rite] ” save :w! “Force saving. Whether the save can be successful depends on the user’s permissions on the file. :w ! sudo tee % ” If you don’t have permission to save, […]

java synchronized keyword

Bytecode level 0x0020 [synchronized] will be added to the method flag. Specifically used are monitorenter and monitorexit 0 load_0 1 dup 2 astore_1 3 monitorenter 4 aload_1 5 monitorexit 6 goto 14 (+ 8) 9 astore_2 10 aload_1 11 monitorexit 12 aload_2 13 throw 14 return Why are there two monitorexits? In addition to normal […]

Python win32api.keybd_event simulates keyboard input

win32api.keybd_event The function prototype: keybd_event(bVk, bScan, dwFlags, dwExtraInfo) The first parameter: virtual key code (see the appendix for the keyboard key code comparison table); The second parameter: hardware scan code, generally set to 0; The third parameter: a flag bit for function operation. If the value is KEYEVENTF_EXTENDEDKEY, the key is pressed. It can also […]