ruby remake of powershell cryptographic hash script