a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Static lib:
 amiga.lib
  ACrypt
  AddTOF
  ArgArrayDone
  ArgArrayInit
  ArgInt
  ArgString
  BeginIO
  CallHook
  CallHookA
  CheckRexxMsg
  CoerceMethod
  CoerceMethodA
  CreateExtIO
  CreatePort
  CreateStdIO
  CreateTask
  CxCustom
  CxDebug
  CxFilter
  CxSender
  CxSignal
  CxTranslate
  DeleteExtIO
  DeletePort
  DeleteStdIO
  DeleteTask
  DoMethod
  DoMethodA
  DoSuperMethod
  DoSuperMethodA
  FastRand
  FreeIEvents
  GetRexxVar
  HookEntry
  HotKey
  InvertString
  LibAllocPooled
  LibCreatePool
  LibDeletePool
  LibFreePooled
  NewList
  RangeRand
  RemTOF
  SetRexxVar
  SetSuperAttrs
  TimeDelay
  afp
  arnd
  dbf
  fpa
  printf
  sprintf
  stdio
Include
GuruMeditation
Docs » Autodocs » amiga.lib » ACrypt

NAME

	ACrypt -- Encrypt a password

SYNOPSIS

	newpass = ACrypt( buffer, password, username )
UBYTE *ACrypt( UBYTE *, UBYTE *, UBYTE *) ;

FUNCTION

	This function takes a buffer of at least 12 characters in length,
an unencrypted password and the user's name (as known to the host
system) and returns an encrypted password in the passed buffer.
This is a one-way encryption. Normally, the user's encrypted
password is stored in a file for future password comparison.

INPUTS

	buffer     - a pointer to a buffer at least 12 bytes in length.
password - a pointer to an unencrypted password string.
username - a pointer to the user's name.

RESULT

	newpass    - a pointer to the passed buffer if successful, NULL
upon failure. The encrypted password placed in the
buffer will be be eleven (11) characters in length
and will be NULL-terminated.

EXAMPLE

	UBYTE *pw, *getpassword() ;
UBYTE *user = "alf"
UBYTE *newpass ;
UBYTE buffer[16] ; /* size >= 12 */
pw = getpassword() ; /* your own function */
if((newpass = ACrypt(buffer, pw, user)) != NULL)
{
printf("pw = %s\n", newpass) ; /* newpass = &buffer[0] */
}
else
{
printf("ACrypt failed\n") ;
}

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Abyss

AYS
RSI
TSL
ANA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se