Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

digest(3o) [debian man page]

Digest(3o)							   OCaml library							Digest(3o)

NAME
Digest - MD5 message digest. Module Module Digest Documentation Module Digest : sig end MD5 message digest. This module provides functions to compute 128-bit ``digests'' of arbitrary-length strings or files. The digests are of cryptographic qual- ity: it is very hard, given a digest, to forge a string having that digest. The algorithm used is MD5. type t = string The type of digests: 16-character strings. val string : string -> t Return the digest of the given string. val substring : string -> int -> int -> t Digest.substring s ofs len returns the digest of the substring of s starting at character number ofs and containing len characters. val channel : Pervasives.in_channel -> int -> t If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest. val file : string -> t Return the digest of the file whose name is given. val output : Pervasives.out_channel -> t -> unit Write a digest on the given output channel. val input : Pervasives.in_channel -> t Read a digest from the given input channel. val to_hex : t -> string Return the printable hexadecimal representation of the given digest. OCamldoc 2012-06-26 Digest(3o)

Check Out this Related Man Page

Digest::HMAC(3) 					User Contributed Perl Documentation					   Digest::HMAC(3)

NAME
Digest::HMAC - Keyed-Hashing for Message Authentication SYNOPSIS
# Functional style use Digest::HMAC qw(hmac hmac_hex); $digest = hmac($data, $key, &myhash); print hmac_hex($data, $key, &myhash); # OO style use Digest::HMAC; $hmac = Digest::HMAC->new($key, "Digest::MyHash"); $hmac->add($data); $hmac->addfile(*FILE); $digest = $hmac->digest; $digest = $hmac->hexdigest; $digest = $hmac->b64digest; DESCRIPTION
HMAC is used for message integrity checks between two parties that share a secret key, and works in combination with some other Digest algorithm, usually MD5 or SHA-1. The HMAC mechanism is described in RFC 2104. HMAC follow the common "Digest::" interface, but the constructor takes the secret key and the name of some other simple "Digest::" as argument. The hmac() and hmac_hex() functions and the Digest::HMAC->new() constructor takes an optional $blocksize argument as well. The HMAC algorithm assumes the digester to hash by iterating a basic compression function on blocks of data and the $blocksize should match the byte-length of such blocks. The default $blocksize is 64 which is suitable for the MD5 and SHA-1 digest functions. For stronger algorithms the blocksize probably needs to be increased. SEE ALSO
Digest::HMAC_MD5, Digest::HMAC_SHA1 RFC 2104 AUTHORS
Graham Barr <gbarr@ti.com>, Gisle Aas <gisle@aas.no> perl v5.18.2 2011-07-25 Digest::HMAC(3)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Digest MD5

Dear Guys , Am sorry i ask alot , but i do not know that much about perl , cgi , MD5 ! now i installed MD5 and Digest MD5 to my solaries 7 sparc machine . when i execute the command : $perl Makefile.PL i get the follwoing error message ,, please tell me how to fix it , i need... (11 Replies)
Discussion started by: tamemi
11 Replies

2. Shell Programming and Scripting

command/script to extract a substring from a string

I have a long string "<ID type="Oid">{}</ID>" I need to extract "GigabitEthernet0/1" from the above string. How can it be done? :) (5 Replies)
Discussion started by: girisha
5 Replies

3. Shell Programming and Scripting

simple substring?

Anyone has an easy approach on the below please? :) I want the output of my "ls" command to output only the 5th-9th characters only. For example: ls FILE*.txt ==>> FILEXINOO123.txt FILEBASHY007.txt FILEPERLA456.txt FILEAWKER003.txt FILESMILE001.txt I want the output of my "ls"... (1 Reply)
Discussion started by: xinoo
1 Replies

4. UNIX for Dummies Questions & Answers

Extracting substring using ${var:start:len}

Hi All, I am trying to extract substring from a variable by using the pattern as var3=${var2:3:3} var2 is a variable already declared and having the value. From var2 i need to extract 3 characters from 3rd position. When ever i give the expression var3=${var2:3:3} on shell prompt, the... (3 Replies)
Discussion started by: Raamc
3 Replies

5. UNIX for Dummies Questions & Answers

Different MD5 value when using 'digest' command

Hi guys, I need to anonymise some data; Some of it in an Oracle database and some in text files. I'm using the 'digest' command on Solaris 10 OS and an Oracle function to encode the data in the database. However, as a test, when i try to encode the same string in the dataabse ans OS, I get... (4 Replies)
Discussion started by: zaff
4 Replies

6. Shell Programming and Scripting

string tokenizing

I have a string that looks like this: blahblahblah_^substring^_blahblahblah I need to extract substring, the bit between the ^ characters, into another string variable. This will be in a bash shell script. Thanks. (2 Replies)
Discussion started by: daflore
2 Replies

7. Shell Programming and Scripting

Help on extracting a substring from the input string

Hi, I am new to Unix. I am trying to extract a substring from an input string: Ex - input string: deploy_v11_9_1 i want to extract and store the value v11_9_1 from the input string in a new variable. I am using following command in my shell script file: echo "Enter the folder name u... (5 Replies)
Discussion started by: Pranav Bhasker
5 Replies