Switch conversion switch from 'ce' to 'cvt'
There were some collisions in the RSA test vectorspull/186/merge
parent
30ac06dd0d
commit
4da06919eb
|
|
@ -116,16 +116,17 @@ void PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransfo
|
||||||
s1 = s1.substr(s1.find(' ')+1);
|
s1 = s1.substr(s1.find(' ')+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use like this (from Threefish test vectors, which supplies byte-reversed values):
|
// Convert endian order. Use it with 64-bit words like this:
|
||||||
// Key: ce BC2560EFC6BBA2B1 E3361F162238EB40 FB8631EE0ABBD175 7B9479D4C5479ED1
|
// Key: cvt BC2560EFC6BBA2B1 E3361F162238EB40 FB8631EE0ABBD175 7B9479D4C5479ED1
|
||||||
// The 'ce' means BC2560EFC6BBA2B1 will be processed into B1A2BBC6EF6025BC.
|
// BC2560EFC6BBA2B1 will be processed into B1A2BBC6EF6025BC.
|
||||||
if (s1.length() >= 3 && s1.substr(0,3) == "ce ")
|
if (s1.length() >= 3 && s1.substr(0,3) == "cvt")
|
||||||
{
|
{
|
||||||
word64 value;
|
word64 value;
|
||||||
std::istringstream iss(s1.substr(3));
|
std::istringstream iss(s1.substr(3));
|
||||||
while (iss >> std::hex >> value)
|
while (iss >> std::hex >> value)
|
||||||
q.Put((const byte *)&value, 8);
|
q.Put((const byte *)&value, 8);
|
||||||
|
|
||||||
|
s1.clear(); s2.clear();
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue