- Publicity: Public Only All
file-storage-torrent-procs.tcl
- Location:
- packages/file-storage/tcl/file-storage-torrent-procs.tcl
- Created:
- 2005-10-25
- Author:
- Al-Faisal El-Dajani <faisal.dajani@gmail.com>
Procedures in this file
- fs::torrent::get_hashsum (public, deprecated)
Detailed information
fs::torrent::get_hashsum (public, deprecated)
fs::torrent::get_hashsum -filename filename
Deprecated. Invoking this procedure generates a warning.
Get hashsum for the file using SHA1 hashsum technique. DEPRECATED: NaviServer can now perform such a digest in a oneliner that won't require slurping the file first.
- Switches:
- -filename (required)
- Name of file to get hashsum for. Must be in absolute path format.
- Returns:
- Hashsum of file in hexa.
- Author:
- Al-Faisal El-Dajani <faisal.dajani@gmail.com>
- Created:
- 2005-10-25
- See Also:
- ns_md
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Content File Source
ad_library { @author Al-Faisal El-Dajani (faisal.dajani@gmail.com) @creation-date 2005-10-25 } namespace eval fs::torrent {} d_proc -deprecated fs::torrent::get_hashsum { {-filename:required} } { Get hashsum for the file using SHA1 hashsum technique. DEPRECATED: NaviServer can now perform such a digest in a oneliner that won't require slurping the file first. @see ns_md @author Al-Faisal El-Dajani (faisal.dajani@gmail.com) @creation-date 2005-10-25 @param filename Name of file to get hashsum for. Must be in absolute path format. @return Hashsum of file in hexa. } { set file_stream [open $filename r] set file_contents [read $file_stream] close $file_stream return [ns_sha1 $file_contents] } # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: