stream_salsa2012.c 520 B

1234567891011121314151617181920212223242526
  1. #include "crypto_stream_salsa2012.h"
  2. #include "randombytes.h"
  3. size_t
  4. crypto_stream_salsa2012_keybytes(void)
  5. {
  6. return crypto_stream_salsa2012_KEYBYTES;
  7. }
  8. size_t
  9. crypto_stream_salsa2012_noncebytes(void)
  10. {
  11. return crypto_stream_salsa2012_NONCEBYTES;
  12. }
  13. size_t
  14. crypto_stream_salsa2012_messagebytes_max(void)
  15. {
  16. return crypto_stream_salsa2012_MESSAGEBYTES_MAX;
  17. }
  18. void
  19. crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES])
  20. {
  21. randombytes_buf(k, crypto_stream_salsa2012_KEYBYTES);
  22. }