Correct test vector in base64 test
This is a copy of https://widevine-internal-review.googlesource.com/#/c/10050 The non-encoded base64 test vectors were modifed for the source release, but the encoded test vectors were not updated to match. This CL updates the encoded test vectors to match. Change-Id: I95ed881007e80da2d464f303eacf55cda38b586d
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
// Test vectors taken from http://tools.ietf.org/html/rfc4648#section-10
|
||||
// Test vectors as suggested by http://tools.ietf.org/html/rfc4648#section-10
|
||||
const std::string kNullString("");
|
||||
const std::string kf("f");
|
||||
const std::string kfo("fo");
|
||||
@@ -25,16 +25,16 @@ const std::string kfoobarB64("Zm9vYmFy");
|
||||
|
||||
// Arbitrary clear test vectors
|
||||
const std::string kMultipleOf24BitsData("Good day!");
|
||||
const std::string kOneByteOverData("Hello Googler");
|
||||
const std::string kTwoBytesOverData("Hello Googlers");
|
||||
const std::string kOneByteOverData("Hello Friend!");
|
||||
const std::string kTwoBytesOverData("Hello Friend!!");
|
||||
const std::string kTestData =
|
||||
"\030\361\\\366\267> \331\210\360\\-\311:\324\256\376"
|
||||
"\261\234\241\326d\326\177\346\346\223\333Y\305\214\330";
|
||||
|
||||
// Arbitrary encoded test vectors
|
||||
const std::string kMultipleOf24BitsB64Data("R29vZCBkYXkh");
|
||||
const std::string kOneByteOverB64Data("SGVsbG8gR29vZ2xlcg==");
|
||||
const std::string kTwoBytesOverB64Data("SGVsbG8gR29vZ2xlcnM=");
|
||||
const std::string kOneByteOverB64Data("SGVsbG8gRnJpZW5kIQ==");
|
||||
const std::string kTwoBytesOverB64Data("SGVsbG8gRnJpZW5kISE=");
|
||||
const std::string kB64TestData = "GPFc9rc-INmI8FwtyTrUrv6xnKHWZNZ_5uaT21nFjNg=";
|
||||
|
||||
const std::pair<const std::string*, const std::string*> kBase64TestVectors[] = {
|
||||
|
||||
Reference in New Issue
Block a user