Skip to content

Instantly share code, notes, and snippets.

View yunkaiOr2's full-sized avatar
🎯
Native Java, High Availability, High Concurrency, Distributed Systems

yunkai yunkaiOr2

🎯
Native Java, High Availability, High Concurrency, Distributed Systems
  • shanghai
  • 02:11 (UTC +08:00)
View GitHub Profile
import org.apache.commons.compress.archivers.tar.TarArchiveEntry
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
import org.apache.commons.io.FileUtils
import java.nio.file.Files
import java.util.zip.GZIPInputStream
url = new URL("http://xxx.tar.gz")
tempFile = Files.createTempFile(null, null)
@yunkaiOr2
yunkaiOr2 / rsa.groovy
Created August 11, 2021 14:20
rsa script groovy
package tools;
import org.apache.commons.io.IOUtils;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;