*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> isencrypt (3g)              
Title
Content
Arch
Section
 

Contents


isencrypt(3G)							 isencrypt(3G)


NAME    [Toc]    [Back]

     isencrypt - determine whether a character buffer is encrypted

SYNOPSIS    [Toc]    [Back]

     cc	[flag ...] file	...  -lgen [library ...]

     #include <libgen.h>

     int isencrypt (const char *fbuf<b>, size_t ninbuf<b>);

DESCRIPTION    [Toc]    [Back]

     isencrypt uses heuristics to determine whether a buffer of	characters is
     encrypted.	 It requires two arguments: a pointer to an array of
     characters	and the	number of characters in	the buffer.

     isencrypt assumes that the	file is	not encrypted if all the characters in
     the first block are ASCII characters.  If there are non-ASCII characters
     in	the first ninbuf characters, isencrypt assumes that the	buffer is
     encrypted if the setlocale	LC_CTYPE category is set to C or ascii.

     If	the LC_CTYPE category is set to	a value	other than C or	ascii, then
     isencrypt uses a combination of heuristics	to determine if	the buffer is
     encrypted.	 If ninbuf has at least	64 characters, a chi-square test is
     used to determine if the bytes in the buffer have a uniform distribution;
     and isencrypt assumes the buffer is encrypted if it does.	If the buffer
     has less than 64 characters, a check is made for null characters and a
     terminating new-line to determine whether the buffer is encrypted.

DIAGNOSTICS    [Toc]    [Back]

     If	the buffer is encrypted, 1 is returned;	otherwise zero is returned.

SEE ALSO    [Toc]    [Back]

      
      
     setlocale(3C)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
iswctype Tru64 Determine the properties of a wide character
mbrlen Linux determine number of bytes in next multibyte character
wcwidth Linux determine columns needed for a wide character
mblen Tru64 Determine the length in bytes of a multibyte character
mblen Linux determine number of bytes in next multibyte character
wcslen Linux determine the length of a wide-character string
mbrlen Tru64 Determine the length in bytes of a multibyte character
wcswidth Tru64 Determine the display width of wide-character strings
wcsnlen Linux determine the length of a fixed-size wide-character string
mbsinit Tru64 Determine whether a multibyte-character string is in the initial conversion state
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service