/*
 * RxCrypt()
 * Copyright (C) 1998 by Dmitry A.Steklenev
 *
 */

#define  INCL_REXXSAA
#include <os2.h>
#include <rexxsaa.h>
#include <string.h>

RexxFunctionHandler RxCrypt;
char *crypt( char *pw, char *salt );

ULONG RxCrypt( PUCHAR    Name,
               ULONG     Argc,
               RXSTRING  Argv[],
               PSZ       Queuename,
               PRXSTRING Retstr     )
{
  if( Argc != 2 )
    return 43;

  strcpy( Retstr->strptr, crypt( Argv[0].strptr, Argv[1].strptr ));
  Retstr->strlength  = strlen( Retstr->strptr );
  return 0;
}