Sha256: 7c678ca136d9da38678751f8e0e8e40375966a37f55ae4f9263253e083dc90ac

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

/*
   BLAKE2 reference source code package - reference C implementations

   Written in 2012 by Samuel Neves <sneves@dei.uc.pt>

   To the extent possible under law, the author(s) have dedicated all copyright
   and related and neighboring rights to this software to the public domain
   worldwide. This software is distributed without any warranty.

   You should have received a copy of the CC0 Public Domain Dedication along with
   this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

#ifndef argon2_impl_H
#define argon2_impl_H

#include <stdint.h>
#include <string.h>

static inline uint32_t rotl32( const uint32_t w, const unsigned c )
{
  return ( w << c ) | ( w >> ( 32 - c ) );
}

static inline uint64_t rotl64( const uint64_t w, const unsigned c )
{
  return ( w << c ) | ( w >> ( 64 - c ) );
}

static inline uint32_t rotr32( const uint32_t w, const unsigned c )
{
  return ( w >> c ) | ( w << ( 32 - c ) );
}

static inline uint64_t rotr64( const uint64_t w, const unsigned c )
{
  return ( w >> c ) | ( w << ( 64 - c ) );
}

#endif

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.11 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h
rbnacl-libsodium-1.0.10 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h
rbnacl-libsodium-1.0.9 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h