Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/planix-v0/sys/src/cmd/ssh1/ciphertwiddle.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "ssh.h"
2
 
3
static CipherState*
4
inittwiddle(Conn *c, int)
5
{
6
	/* must be non-nil */
7
	fprint(2, "twiddle key is %.*H\n", SESSKEYLEN, c->sesskey);
8
	return (CipherState*)~0;
9
}
10
 
11
static void
12
twiddle(CipherState*, uchar *buf, int n)
13
{
14
	int i;
15
 
16
	for(i=0; i<n; i++)
17
		buf[i] ^= 0xFF;
18
}
19
 
20
Cipher ciphertwiddle =
21
{
22
	SSH_CIPHER_TWIDDLE,
23
	"twiddle",
24
	inittwiddle,
25
	twiddle,
26
	twiddle,
27
};
28