This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package studio.safe.spring.resttemplate; | |
import java.io.File; | |
import java.io.IOException; | |
import org.springframework.core.io.FileSystemResource; | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.HttpHeaders; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import java.io.InputStream; | |
import java.security.*; | |
import java.util.Base64; | |
import static java.nio.charset.StandardCharsets.UTF_8; | |
public class RsaExample { | |
public static KeyPair generateKeyPair() throws Exception { | |
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* BIN2ISO (C) 2000 by DeXT | |
This is a very simple utility to convert a BIN image | |
(either RAW/2352 or Mode2/2336 format) to standard ISO format (2048 b/s). | |
Structure of images are as follows: | |
Mode 1 (2352): Sync (12), Address (3), Mode (1), Data (2048), ECC (288) | |
Mode 2 (2352): Sync (12), Address (3), Mode (1), Subheader (8), Data (2048), ECC (280) | |
Mode 2 (2336): Subheader (8), Data (2048), ECC (280) | |
Mode 2 / 2336 is the same as Mode 2 / 2352 but without header (sync+addr+mode) |