Skip to content

Instantly share code, notes, and snippets.

View Youngv's full-sized avatar

Victor Yang Youngv

View GitHub Profile
@Youngv
Youngv / gist:b5bc3199fc0a5ff0814a070ad38a6755
Created September 30, 2018 09:16 — forked from cowboyrushforth/gist:5963752
Java<->Ruby AES-256-CBC PKCS5 Working 2 way encryption
# RUBY
require 'openssl'
require 'digest/sha2'
require 'json'
def bin2hex(str)
str.unpack('C*').map{ |b| "%02X" % b }.join('')
end