OSDN Git Service

488159b32ae2b69fa0bd3165d9113dc3f735557d
[linuxjm/LDP_man-pages.git] / draft / man3 / xcrypt.3
1 .\"  Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"  this is the 3rd type of interface for cryptographic routines
4 .\"  1. encrypt() expects a bit field
5 .\"  2. cbc_crypt() byte values
6 .\"  3. xencrypt() a hexstring
7 .\"  to bad to be true :(
8 .\"
9 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
10 .\"         all rights reserved.
11 .\" Translated Wed Sep 15 01:02:11 JST 2004
12 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
13 .\"
14 .TH XCRYPT 3 2003-04-04 "" "Linux Programmer's Manual"
15 .\"O .SH NAME
16 .SH 名前
17 .\"O xencrypt, xdecrypt, passwd2des \- RFS password encryption
18 xencrypt, xdecrypt, passwd2des \- RFS パスワード暗号化
19 .\"O .SH SYNOPSIS
20 .SH 書式
21 .B "#include <rpc/des_crypt.h>"
22 .sp
23 .BI "void passwd2des(char " *passwd ", char *" key ");"
24 .sp
25 .BI "int xencrypt(char *" secret ", char *" passwd ");"
26 .sp
27 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
28 .\"O .SH DESCRIPTION
29 .SH 説明
30 .\"O The function
31 .\"O .BR passwd2des ()
32 .\"O takes a character string
33 .\"O .I passwd
34 .\"O of arbitrary length and fills a character array
35 .\"O .I key
36 .\"O of length 8.
37 .\"O The array
38 .\"O .I key
39 .\"O is suitable for use as DES key.
40 .\"O It has odd parity set in bit 0 of each byte.
41 関数
42 .BR passwd2des ()
43 は任意の長さの文字列
44 .I passwd
45 をとり、長さ 8 の文字配列
46 .I key
47 を埋める。
48 配列
49 .I key
50 は DES キーとして使うのに適している。
51 この配列の各バイトのビット 0 は奇数パリティである。
52 .\"O Both other functions described here use this function to turn their
53 .\"O argument
54 .\"O .I passwd
55 .\"O into a DES key.
56 ここで説明されている残りの 2 つの関数は、
57 この関数を使い、引き数
58 .I passwd
59 を DES キーに変換する。
60 .LP
61 .\"O The
62 .\"O .BR xencrypt ()
63 .\"O function takes the ASCII character string
64 .\"O .I secret
65 .\"O given in hex,
66 .\"O .\" (over the alphabet 0123456789abcdefABCDEF),
67 .BR xencrypt ()
68 関数は
69 .\" (アルファベット 0123456789abcdefABCDEF で表される)
70 16 進数で与えられた ASCII 文字列
71 .I secret
72 をとる。
73 .\"O which must have a length that is a multiple of 16,
74 この長さは 16 の倍数でなければならない。
75 .\"O encrypts it using the DES key derived from
76 .\"O .I passwd
77 .\"O by
78 .\"O .BR passwd2des (),
79 そして
80 .BR passwd2des ()
81 によって
82 .I passwd
83 から導き出された DES キーを使い、
84 .I secret
85 を暗号化する。
86 .\"O and outputs the result again in
87 .\"O .I secret
88 .\"O as a hex string
89 .\"O .\" (over the alphabet 0123456789abcdef)
90 .\"O of the same length.
91 その結果は
92 .\" (アルファベット 0123456789abcdef で表される)
93 16 進数文字列として
94 .I secret
95 に再び同じ長さで出力される。
96 .LP
97 .\"O The
98 .\"O .BR xdecrypt ()
99 .\"O function performs the converse operation.
100 .BR xdecrypt ()
101 関数は逆の操作を行う。
102 .\"O .SH "RETURN VALUE"
103 .SH 返り値
104 .\"O The functions
105 .\"O .BR xencrypt ()
106 .\"O and
107 .\"O .BR xdecrypt ()
108 .\"O return 1 on success and 0 on error.
109 関数
110 .BR xencrypt ()
111
112 .BR xdecrypt ()
113 は、成功した場合に 1 を返し、失敗した場合に 0 を返す。
114 .\"O .SH VERSIONS
115 .SH バージョン
116 .\"O These routines are present in libc 4.6.27 and later, and in
117 .\"O glibc 2.1 and later.
118 これらのルーチンは libc 4.6.27 以降と glibc 2.1 以降に存在する。
119 .\"O .SH BUGS
120 .SH バグ
121 .\"O The prototypes are missing from the abovementioned include file.
122 上記のインクルードファイルにプロトタイプがない。
123 .\"O .SH "SEE ALSO"
124 .SH 関連項目
125 .BR cbc_crypt (3)