From b0694bef1715b076c6523f48ffccf666940a8aec Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Wed, 7 May 2014 13:06:30 -0700 Subject: [PATCH] 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 --- libwvdrmengine/cdm/core/test/base64_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libwvdrmengine/cdm/core/test/base64_test.cpp b/libwvdrmengine/cdm/core/test/base64_test.cpp index 7ad00ad4..d24ee777 100644 --- a/libwvdrmengine/cdm/core/test/base64_test.cpp +++ b/libwvdrmengine/cdm/core/test/base64_test.cpp @@ -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 kBase64TestVectors[] = {