Ruby

A collection of 4 articles

Read Various RSA Keys in Ruby

I recently worked in a Ruby on Rails project which should integrate with many different payment systems. There system mostly use RSA in encryption and signature. However they provide the RSA keys in different formats, it is a challenge to choose a right way to read the keys in Ruby. RSA is an asymmetric cryptographic algorithm, thus it requires two keys, private key and public key. The key itself is just binary, but it can be encoded in different format.

Updated  •  2 min read

[Outdated] Tmux And Rvmrc

RVM has since moved to using .profile, so just put the “cd .” in .profile and it will work — Mikael Wikman commented below Original Article Tmux is a terminal multiplexer. I switched to Tmux from GNU Screen recently. I work on several Ruby projects. I use RVM to manage gem set for different projects, and use rvmrc file to switch gem set automatically. I usually start a Tmux session for a project in its root directory, so all the windows and panes in the session use the project root as default directory. The problem is, the new created shell in the session does not load .rvmrc in the root directory. I have to force loading the file using “cd .”…

Updated  •  2 min read