@@ -36,39 +36,4 @@ public static void randombytes_switch_algorithm(String alg_name)
3636 throw new RuntimeException ("Cannot switch rand algorithm" );
3737 }
3838 }
39-
40- /**
41- * \brief Wrapper for OQS_API void OQS_randombytes_nist_kat_init(
42- * const uint8_t *entropy_input,
43- * const uint8_t *personalization_string,
44- * int security_strength);
45- *
46- * \param Entropy input seed, must be exactly 48 bytes long
47- * \param Entropy seed length
48- * \param Optional personalization string, which, if non-empty, must be at
49- * least 48 byte[] long
50- * \param personalization string length
51- */
52- private static native void randombytes_nist_kat_init (byte [] entropy_input ,
53- byte [] personalization_string ,
54- long personalization_string_len );
55-
56- public static void randombytes_nist_kat_init (byte [] entropy_input ) {
57- randombytes_nist_kat_init (entropy_input , null );
58- }
59-
60- public static void randombytes_nist_kat_init (byte [] entropy_input ,
61- byte [] personalization_string ) {
62- if (entropy_input .length != 48 ) {
63- throw new RuntimeException ("The entropy source must be exactly 48 byte[] long" );
64- }
65- if (personalization_string == null ) {
66- randombytes_nist_kat_init (entropy_input , null , 0 );
67- return ;
68- }
69- if (personalization_string .length < 48 ) {
70- throw new RuntimeException ("The personalization string must be either empty or at least 48 byte[] long" );
71- }
72- randombytes_nist_kat_init (entropy_input , personalization_string , personalization_string .length );
73- }
7439}
0 commit comments