XrdCryptoMsgDigest.cc

Go to the documentation of this file.
00001 // $Id: XrdCryptoMsgDigest.cc 30949 2009-11-02 16:37:58Z ganis $
00002 
00003 const char *XrdCryptoMsgDigestCVSID = "$Id: XrdCryptoMsgDigest.cc 30949 2009-11-02 16:37:58Z ganis $";
00004 /******************************************************************************/
00005 /*                                                                            */
00006 /*                 X r d C r y p t o M s g D i g e s t . c c                  */
00007 /*                                                                            */
00008 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
00009 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00010 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00011 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00012 /******************************************************************************/
00013 
00014 /* ************************************************************************** */
00015 /*                                                                            */
00016 /* Abstract interface for Message Digest crypto functionality.                */
00017 /* Allows to plug-in modules based on different crypto implementation         */
00018 /* (OpenSSL, Botan, ...)                                                      */
00019 /*                                                                            */
00020 /* ************************************************************************** */
00021 
00022 #include <string.h>
00023 
00024 #include <XrdCrypto/XrdCryptoAux.hh>
00025 #include <XrdCrypto/XrdCryptoMsgDigest.hh>
00026 
00027 //_____________________________________________________________________________
00028 bool XrdCryptoMsgDigest::IsValid()
00029 {
00030    // Check key validity
00031    ABSTRACTMETHOD("XrdCryptoMsgDigest::IsValid");
00032    return 0;
00033 }
00034 
00035 //______________________________________________________________________________
00036 bool XrdCryptoMsgDigest::operator==(const XrdCryptoMsgDigest md)
00037 {
00038    // Compare msg digest md to local md: return 1 if matches, 0 if not
00039 
00040    if (md.Length() == Length()) {
00041       if (!memcmp(md.Buffer(),Buffer(),Length()))
00042          return 1;
00043    }
00044    return 0;
00045 }
00046 //_____________________________________________________________________________
00047 int XrdCryptoMsgDigest::Reset(const char *dgst)
00048 {
00049    // Re-Init the message digest calculation
00050 
00051    ABSTRACTMETHOD("XrdCryptoMsgDigest::Reset");
00052    return -1;
00053 }
00054 
00055 //_____________________________________________________________________________
00056 int XrdCryptoMsgDigest::Update(const char *b, int l)
00057 {
00058    // Update message digest with the MD of l bytes at b.
00059 
00060    ABSTRACTMETHOD("XrdCryptoMsgDigest::Update");
00061    return -1;   
00062 }
00063 
00064 //_____________________________________________________________________________
00065 int XrdCryptoMsgDigest::Final()
00066 {
00067    // Finalize message digest calculation.
00068 
00069    ABSTRACTMETHOD("XrdCryptoMsgDigest::Final");
00070    return -1;   
00071 }

Generated on Tue Jul 5 14:46:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1