/[winpt]/trunk/Src/wptFileStatDlg.cpp
ViewVC logotype

Diff of /trunk/Src/wptFileStatDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 65 by twoaday, Thu Nov 3 16:55:25 2005 UTC revision 178 by twoaday, Tue Feb 21 12:12:23 2006 UTC
# Line 17  Line 17 
17   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
18   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19   */   */
   
20  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
21  #include <config.h>  #include <config.h>
22  #endif  #endif
# Line 64  get_symkey_algo (int algo) Line 63  get_symkey_algo (int algo)
63      case 7: return "AES";      case 7: return "AES";
64      case 8: return "AES-192";      case 8: return "AES-192";
65      case 9: return "AES-256";      case 9: return "AES-256";
66        default: break;
67      }          }    
68      return "UNKNOWN";      return "UNKNOWN";
69  }  }
# Line 84  get_digest_algo (int algo) Line 84  get_digest_algo (int algo)
84      case 8: return "SHA256";      case 8: return "SHA256";
85      case 9: return "SHA384";      case 9: return "SHA384";
86      case 10:return "SHA512";      case 10:return "SHA512";
87        default: break;
88      }      }
89      return "UNKNOWN";      return "UNKNOWN";
90  }  }
# Line 97  get_compress_algo (int algo) Line 98  get_compress_algo (int algo)
98      case 1: return "ZIB";      case 1: return "ZIB";
99      case 2: return "ZLIB";      case 2: return "ZLIB";
100      case 3: return "BZIP2";      case 3: return "BZIP2";
101        default: break;
102      }      }
103      return "UNKNOWN";      return "UNKNOWN";
104  }  }
105    
106    
107  static const char*  static const char*
108    get_s2k_algo (int algo)
109    {
110        switch (algo) {
111        case 0: return "SIMPLE";
112        case 1: return "SALTED";
113        case 3: return "ITER+SALTED";
114        default:break;
115        }
116        return "INVALID";
117    }
118    
119    
120    static const char*
121  get_timestring (long timestamp)  get_timestring (long timestamp)
122  {  {
123      static char ts[64];      static char ts[64];
# Line 161  do_list_packets (HWND list, const char * Line 176  do_list_packets (HWND list, const char *
176              {PKT_symkey_enc *enc = pkt->pkt.symkey_enc; n++;              {PKT_symkey_enc *enc = pkt->pkt.symkey_enc; n++;
177              if (!enc)              if (!enc)
178                  break;                  break;
179              _snprintf( inf, sizeof(inf)-1,                    _snprintf (inf, sizeof(inf)-1,
180                  "symmetric key encrypted packet: version %d, cipher %s, s2k %d, hash %s",                                "symmetric key encrypted packet: version %d, cipher %s, s2k %s, hash %s",
181                  enc->version, get_symkey_algo(enc->cipher_algo),                                  enc->version, get_symkey_algo(enc->cipher_algo),                
182                  enc->s2k.mode, get_digest_algo(enc->s2k.hash_algo) );                  get_s2k_algo (enc->s2k.mode), get_digest_algo(enc->s2k.hash_algo));
183              listbox_add_string( list, inf ); }              listbox_add_string (list, inf); }
184              break;              break;
185    
186          case PKT_ENCRYPTED:              case PKT_ENCRYPTED:    
# Line 233  do_list_packets (HWND list, const char * Line 248  do_list_packets (HWND list, const char *
248                  get_compress_algo(zip->algorithm), zip->len );                  get_compress_algo(zip->algorithm), zip->len );
249              listbox_add_string( list, inf ); }              listbox_add_string( list, inf ); }
250              break;              break;
251                
252          default:          default:
253              break;              break;
254          }          }

Legend:
Removed from v.65  
changed lines
  Added in v.178

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26