Fixed TOTP test vectors.
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst
index 97b5c34..f47f08d 100644
--- a/docs/development/test-vectors.rst
+++ b/docs/development/test-vectors.rst
@@ -58,6 +58,12 @@
* CAST5 (CBC, CFB, OFB) generated by this project.
See: :doc:`/development/custom-vectors/cast5`
+Two Factor Authentication
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* HOTP from :rfc:`4226`
+* TOTP from :rfc:`6238` (Note that an `errata`_ for the test vectors in RFC 6238 exists)
+
Creating Test Vectors
---------------------
@@ -93,3 +99,4 @@
.. _`RIPEMD website`: http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
.. _`Whirlpool website`: http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
.. _`Specification repository`: https://github.com/fernet/spec
+.. _`errata`: http://www.rfc-editor.org/errata_search.php?rfc=6238
diff --git a/tests/hazmat/primitives/vectors/oath/rfc-4226.txt b/tests/hazmat/primitives/vectors/twofactor/rfc-4226.txt
similarity index 100%
rename from tests/hazmat/primitives/vectors/oath/rfc-4226.txt
rename to tests/hazmat/primitives/vectors/twofactor/rfc-4226.txt
diff --git a/tests/hazmat/primitives/vectors/oath/rfc-6238.txt b/tests/hazmat/primitives/vectors/twofactor/rfc-6238.txt
similarity index 64%
rename from tests/hazmat/primitives/vectors/oath/rfc-6238.txt
rename to tests/hazmat/primitives/vectors/twofactor/rfc-6238.txt
index cc20995..5a47326 100644
--- a/tests/hazmat/primitives/vectors/oath/rfc-6238.txt
+++ b/tests/hazmat/primitives/vectors/twofactor/rfc-6238.txt
@@ -11,13 +11,13 @@
TIME = 59
TOTP = 46119246
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 2
TIME = 59
TOTP = 90693936
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234
COUNT = 3
TIME = 1111111109
@@ -29,13 +29,13 @@
TIME = 1111111109
TOTP = 68084774
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 5
TIME = 1111111109
TOTP = 25091201
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234
COUNT = 6
TIME = 1111111111
@@ -47,13 +47,13 @@
TIME = 1111111111
TOTP = 67062674
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 8
TIME = 1111111111
TOTP = 99943326
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234
COUNT = 9
TIME = 1234567890
@@ -65,13 +65,13 @@
TIME = 1234567890
TOTP = 91819424
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 11
TIME = 1234567890
TOTP = 93441116
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234
COUNT = 12
TIME = 2000000000
@@ -83,13 +83,13 @@
TIME = 2000000000
TOTP = 90698825
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 14
TIME = 2000000000
TOTP = 38618901
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234
COUNT = 15
TIME = 20000000000
@@ -101,10 +101,10 @@
TIME = 20000000000
TOTP = 77737706
MODE = SHA256
-SECRET = 12345678901234567890
+SECRET = 12345678901234567890123456789012
COUNT = 17
TIME = 20000000000
TOTP = 47863826
MODE = SHA512
-SECRET = 12345678901234567890
+SECRET = 1234567890123456789012345678901234567890123456789012345678901234