// Returns name of EA, cascaded cipher names are separated by hyphens char *EAGetName (char *buf, int ea) { int i = EAGetLastCipher(ea); strcpy (buf, (i != 0) ? CipherGetName (i) : "?"); while (i = EAGetPreviousCipher(ea, i)) { strcat (buf, "-"); strcat (buf, CipherGetName (i)); } return buf; }
// Returns name of EA, cascaded cipher names are separated by hyphens char *EAGetName (char *buf, int ea, int guiDisplay) { if (guiDisplay) { EAGetDisplayName (buf, ea, EAGetLastCipher(ea)); } else { int i = EAGetLastCipher(ea); strcpy (buf, (i != 0) ? CipherGetName (i) : "?"); while (i = EAGetPreviousCipher(ea, i)) { strcat (buf, "-"); strcat (buf, CipherGetName (i)); } } return buf; }
static void EAGetDisplayName(char *buf, int ea, int i) { strcpy (buf, CipherGetName (i)); if (i = EAGetPreviousCipher(ea, i)) { strcat (buf, "("); EAGetDisplayName (&buf[strlen(buf)], ea, i); strcat (buf, ")"); } }