I am trying to implement TOTTP algorithm described here: https://www.rfc-editor.org/rfc/rfc6238
Key key = new SecretKeySpec(seed.getBytes(StandardCharsets.UTF_8), "HmacSHA512");
However RFC says that:
Seed for HMAC-SHA512 - 64 bytes
String seed64 = "3132333435363738393031323334353637383930" +
"3132333435363738393031323334353637383930" +
"3132333435363738393031323334353637383930" +
"31323334";
Is this
seed64
64 bytes and what happens if I don't pass a 64 bytes seed at like I do with my key generation (my seed has an arbitrary length)?Should I use Base64 encoding for my seed?