Sha256: d2badf669079ea0d207560cd61b3266e2231f101379c26415ed6c3f173a4f382

Contents?: true

Size: 464 Bytes

Versions: 3

Compression:

Stored size: 464 Bytes

Contents

#include <string>
using std::string;
#include "crypto_scalarmult.h"

string crypto_scalarmult(const string &n,const string &p)
{
  unsigned char q[crypto_scalarmult_BYTES];
  if (n.size() != crypto_scalarmult_SCALARBYTES) throw "incorrect scalar length";
  if (p.size() != crypto_scalarmult_BYTES) throw "incorrect element length";
  crypto_scalarmult(q,(const unsigned char *) n.c_str(),(const unsigned char *) p.c_str());
  return string((char *) q,sizeof q);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/crypto_scalarmult/wrapper-mult.cpp
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/crypto_scalarmult/wrapper-mult.cpp
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/crypto_scalarmult/wrapper-mult.cpp