Skip to main content
rb.codec turns any bytes into Base64 or lowercase hex text and back. A script reaches for it to pass binary data to a call that takes only valid UTF-8, such as rb.hash. These are encodings, not encryption. This script round-trips text through Base64, binary bytes through hex, and catches a decode error: