Posts about ssl
9 years ago
AES encryption in Ruby and Decryption in Java
This one is precious, as it took me a long time to figure out. As a side-note, Java apparently only supports 128bit AES.
Here's the Ruby code:
def encrypt(string, pwd) salt = OpenSSL::Random.random_bytes(16)
# prepare cipher for encryption...
Avoiding SSL redirect loop
If you are configuring an nginx website to use SSL and - by any chance - you need to setup more than one “server” entry (for instance to make www redirect to the plain URL), keep in mind that you need to declare the ssl certificate mumbo-jumbo in both...