summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-13 04:48:11 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-13 04:48:11 +1000
commit267e28bb75e97755ab3bbe128b75623734f2b3fd (patch)
tree76e56b7e0f84c66e7f9035d08aff9be8846a0622 /key.c
parent78913e0059a7f5ff1770488cdf49823e290daa45 (diff)
- otto@cvs.openbsd.org 2008/06/12 00:13:13
[key.c] use an odd number of rows and columns and a separate start marker, looks better; ok grunk@
Diffstat (limited to 'key.c')
-rw-r--r--key.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/key.c b/key.c
index ef047463b..1f27926d1 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.72 2008/06/11 23:51:57 grunk Exp $ */ 1/* $OpenBSD: key.c,v 1.73 2008/06/12 00:13:13 otto Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -319,8 +319,8 @@ key_fingerprint_bubblebabble(u_char *dgst_raw, u_int dgst_raw_len)
319 * Graphs are not unambiguous, because circles in graphs can be 319 * Graphs are not unambiguous, because circles in graphs can be
320 * walked in either direction. 320 * walked in either direction.
321 */ 321 */
322#define FLDSIZE_Y 8 322#define FLDSIZE_Y (8 + 1)
323#define FLDSIZE_X (FLDSIZE_Y * 2) 323#define FLDSIZE_X (8 * 2 + 1)
324static char * 324static char *
325key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) 325key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len)
326{ 326{
@@ -328,7 +328,7 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len)
328 * Chars to be used after each other every time the worm 328 * Chars to be used after each other every time the worm
329 * intersects with itself. Matter of taste. 329 * intersects with itself. Matter of taste.
330 */ 330 */
331 char *augmentation_string = " .o+=*BOX@%&#/^"; 331 char *augmentation_string = " .o+=*BOX@%&#/^S";
332 char *retval, *p; 332 char *retval, *p;
333 u_char field[FLDSIZE_X][FLDSIZE_Y]; 333 u_char field[FLDSIZE_X][FLDSIZE_Y];
334 u_int i, b; 334 u_int i, b;
@@ -341,7 +341,6 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len)
341 memset(field, 0, FLDSIZE_X * FLDSIZE_Y * sizeof(char)); 341 memset(field, 0, FLDSIZE_X * FLDSIZE_Y * sizeof(char));
342 x = FLDSIZE_X / 2; 342 x = FLDSIZE_X / 2;
343 y = FLDSIZE_Y / 2; 343 y = FLDSIZE_Y / 2;
344 field[x][y] = 1;
345 344
346 /* process raw key */ 345 /* process raw key */
347 for (i = 0; i < dgst_raw_len; i++) { 346 for (i = 0; i < dgst_raw_len; i++) {
@@ -364,6 +363,7 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len)
364 input = input >> 2; 363 input = input >> 2;
365 } 364 }
366 } 365 }
366 field[FLDSIZE_X / 2][FLDSIZE_Y / 2] = len;
367 367
368 /* fill in retval */ 368 /* fill in retval */
369 p = retval; 369 p = retval;