fs::torrent::get_hashsum (public, deprecated)

 fs::torrent::get_hashsum -filename filename

Defined in packages/file-storage/tcl/file-storage-torrent-procs.tcl

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):
%3 ad_log_deprecated ad_log_deprecated (public) fs::torrent::get_hashsum fs::torrent::get_hashsum fs::torrent::get_hashsum->ad_log_deprecated

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc fs::torrent::get_hashsum
    set file_stream [open $filename r]
    set file_contents [read $file_stream]
    close $file_stream
    return [ns_sha1 $file_contents]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: