Skip to content

Instantly share code, notes, and snippets.

View Pro-Bithub's full-sized avatar
:octocat:
Focusing

Hatem-ghozzi Pro-Bithub

:octocat:
Focusing
View GitHub Profile
@Pro-Bithub
Pro-Bithub / ParseRSAKeys.java
Created December 2, 2020 09:55 — forked from destan/ParseRSAKeys.java
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@Pro-Bithub
Pro-Bithub / EncryptionUtil.java
Created February 4, 2021 09:00 — forked from cxubrix/EncryptionUtil.java
Simple encrypt/decrypt util for url parameters
package lv.org.substance.crypt
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.KeySpec;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;