~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to extra/mysql_password_hash.c

  • Committer: Lee Bieber
  • Date: 2011-02-11 20:30:05 UTC
  • mfrom: (2157.1.3 build)
  • Revision ID: kalebral@gmail.com-20110211203005-757o1y2yf78dxzqr
Merge Stewart - 716848: drizzleimport displays wrong program_name
Merge Stewart - update README file
Merge Andrew and Joe - Exposes the InnoDB SYS_REPLICATION_LOG to data_dictionary so that it is fast and fixes many issues we have been having

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 */
36
36
 
37
37
 
38
 
#include <config.h>
 
38
#include "config.h"
39
39
 
40
 
#include <cstring>
41
 
#include <iostream>
 
40
#include <stdio.h>
 
41
#include <string.h>
42
42
 
43
43
#include <libdrizzle/drizzle_client.h>
44
44
 
45
 
static const uint32_t BUFFER_CHUNK= 8192;
 
45
#define BUFFER_CHUNK 8192
46
46
 
47
47
int main(int argc, char *argv[])
48
48
{
50
50
 
51
51
  if (argc != 2)
52
52
  {
53
 
    std::cerr << "Usage: " << argv[0] << " <password to hash>" << std::endl;
 
53
    printf("Usage: %s <password to hash>\n", argv[0]);
54
54
    return 1;
55
55
  }
56
56
 
57
57
  drizzle_mysql_password_hash(hashed_password, argv[1], strlen(argv[1]));
58
58
 
59
 
  std::cout << hashed_password << std::endl;
 
59
  printf("%s\n", hashed_password);
60
60
 
61
61
  return 0;
62
62
}