/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* This function encodes the string according to salt */
#include <stdio.h>
#include <crypt.h>
#include <unistd.h>

int main() {
    char key[]  = "test";
    char salt[] = "sT";
    char *result;

    result = crypt(key,salt);
    printf("the key to be encrypted is '%s'.\n",key);
    printf("the key is encrypt to '%s'.\n",result);    
}
