undo, didn't work
This commit is contained in:
parent
e9bc66c84f
commit
8716dbea40
@ -85,39 +85,8 @@ static int convert(unsigned char *s)
|
|||||||
return s-d;
|
return s-d;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char *ustrsep(char **string ,const char *delim)
|
static unsigned char *ustrsep(char **p,const char *sep)
|
||||||
{
|
{ return (unsigned char *)strsep((char **)p,sep); }
|
||||||
char isdelim[256];
|
|
||||||
char *token = *string;
|
|
||||||
|
|
||||||
if (**string == 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
memset(isdelim, 0, 256);
|
|
||||||
isdelim[0] = 1;
|
|
||||||
|
|
||||||
while (*delim)
|
|
||||||
{
|
|
||||||
isdelim[(unsigned char)(*delim)] = 1;
|
|
||||||
delim++;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (!isdelim[(unsigned char)(**string)])
|
|
||||||
{
|
|
||||||
while (!isdelim[(unsigned char)(**string)])
|
|
||||||
{
|
|
||||||
(*string)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (**string)
|
|
||||||
{
|
|
||||||
**string = 0;
|
|
||||||
(*string)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
||||||
const unsigned char *iv,int in,
|
const unsigned char *iv,int in,
|
||||||
@ -328,7 +297,7 @@ int main(int argc,char **argv)
|
|||||||
if(line[0] == '#' || line[0] == '\n')
|
if(line[0] == '#' || line[0] == '\n')
|
||||||
continue;
|
continue;
|
||||||
p=line;
|
p=line;
|
||||||
cipher=(char*)ustrsep(&p,":");
|
cipher=strsep(&p,":");
|
||||||
key=ustrsep(&p,":");
|
key=ustrsep(&p,":");
|
||||||
iv=ustrsep(&p,":");
|
iv=ustrsep(&p,":");
|
||||||
plaintext=ustrsep(&p,":");
|
plaintext=ustrsep(&p,":");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user