Sha256: 108d738ab889e350619d9380d0dfeeacc6f1f1fa0e2abd2b299bc437584aee26

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

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

string crypto_onetimeauth(const string &m,const string &k)
{
  if (k.size() != crypto_onetimeauth_KEYBYTES) throw "incorrect key length";
  unsigned char a[crypto_onetimeauth_BYTES];
  crypto_onetimeauth(a,(const unsigned char *) m.c_str(),m.size(),(const unsigned char *) k.c_str());
  return string((char *) a,crypto_onetimeauth_BYTES);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/crypto_onetimeauth/wrapper-auth.cpp
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/crypto_onetimeauth/wrapper-auth.cpp
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/crypto_onetimeauth/wrapper-auth.cpp