Skip to content

Instantly share code, notes, and snippets.

@koba-ninkigumi
koba-ninkigumi / sign
Created September 24, 2012 02:02
How to make, show and verify binary signature with openssl.
自己署名証明書の作成
# Make key.pem and cert.pem
openssl req -new -days 365 -x509 -nodes -keyout key.pem -out cert.pem
証明書の内容の表示
# Show cert.pem
openssl x509 -text -noout < cert.pem
署名ファイルの作成
# Make signature
@newhavengill
newhavengill / TripleDESTest.java
Created May 2, 2012 03:47
Simple TripleDES Encrypt/Decrypt Test
import java.security.MessageDigest;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
/**
* Simple TripleDES Encrypt/Decrypt Test