Sha256: 3068c2bf6df543a16dddce8f9e89fe9fa630a1844b19aa6f13d0e3f77bdcf9f8
Contents?: true
Size: 528 Bytes
Versions: 6
Compression:
Stored size: 528 Bytes
Contents
#include <string.h> #include "crypto_hash_sha512.h" #include "crypto_scalarmult_curve25519.h" #include "api.h" #include "randombytes.h" int crypto_box_seed_keypair( unsigned char *pk, unsigned char *sk, const unsigned char *seed ) { unsigned char hash[64]; crypto_hash_sha512(hash,seed,32); memmove(sk,hash,32); return crypto_scalarmult_curve25519_base(pk,sk); } int crypto_box_keypair( unsigned char *pk, unsigned char *sk ) { randombytes_buf(sk,32); return crypto_scalarmult_curve25519_base(pk,sk); }
Version data entries
6 entries across 6 versions & 1 rubygems