Skip to content

Instantly share code, notes, and snippets.

View abhisekpadhi's full-sized avatar
🧪
Experimenting...

Abhisek Padhi abhisekpadhi

🧪
Experimenting...
View GitHub Profile
@destan
destan / ParseRSAKeys.java
Last active March 29, 2024 10:43
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;
@rakeshsingh
rakeshsingh / Java Code - Url Shortener.java
Last active January 4, 2024 03:42
Java Code - Url Shortener
package testjava;
import java.util.HashMap;
import java.util.Random;
/*
* URL Shortener
*/
public class URLShortener {
// storage for generated keys