~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/mysql_password_hash.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:24:18 UTC
  • mfrom: (2159.1.1 remove-lint)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172418-vd210j88hiwk8jih
Removed the lint stuff.

Show diffs side-by-side

added added

removed removed

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