Device solutions
End to end solutions
Product accelerators
Get Started
APIs
IoT Devices
Ruby provides a build-in module called digest to calculate the checksum for a file. The digest module does not require any extra installation.
digest
Include the digest module using the following code sample:
require 'digest'
Code Sample to Calculate Checksum
checksum = Digest::SHA2.hexdigest( File.read("Path of the file") );
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.