Sample code for 30+ languages & platforms
Ruby

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat Ruby Downloads

Ruby
require 'chilkat'

success = false

str = Chilkat::CkSecureString.new()
str.put_MaintainHash("sha256")
str.Append("Hello World")

encodedHash = str.hashVal("base64")
print encodedHash + "\n";