Functions | Variables

ink_auth_api.cc File Reference

PE/TE authentication definitions. More...

#include <time.h>
#include <stdint.h>
#include "ink_rand.h"
#include "ink_code.h"
#include "ink_auth_api.h"
Include dependency graph for ink_auth_api.cc:

Go to the source code of this file.

Functions

static InkRand s_rand_gen (ink_rand_r((unsigned int *)&s_rand_seed)^(uintptr_t)&s_rand_seed)
uint32_t ink_get_rand_intrn ()
void ink_make_token_intrn (INK_AUTH_TOKEN *tok, const INK_AUTH_SEED *const *seeds, int slen)
uint32_t ink_get_rand ()
void ink_make_token (INK_AUTH_TOKEN *tok, const INK_AUTH_TOKEN &mask, const INK_AUTH_SEED *const *seeds, int slen)
uint32_t ink_make_token32 (uint32_t mask, const INK_AUTH_SEED *const *seeds, int slen)
uint64_t ink_make_token64 (uint64_t mask, const INK_AUTH_SEED *const *seeds, int slen)

Variables

static int s_rand_seed = time(NULL)

Detailed Description

PE/TE authentication definitions.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file ink_auth_api.cc.


Function Documentation

uint32_t ink_get_rand (  ) 

Definition at line 52 of file ink_auth_api.cc.

References ink_get_rand_intrn().

uint32_t ink_get_rand_intrn (  )  [inline]

Definition at line 35 of file ink_auth_api.cc.

References InkRand::random(), and s_rand_gen().

Referenced by ink_get_rand(), ink_make_token(), ink_make_token32(), and ink_make_token64().

void ink_make_token ( INK_AUTH_TOKEN tok,
const INK_AUTH_TOKEN mask,
const INK_AUTH_SEED *const *  seeds,
int  slen 
)

Definition at line 58 of file ink_auth_api.cc.

References ink_get_rand_intrn(), ink_make_token_intrn(), and INK_AUTH_TOKEN::u32.

uint32_t ink_make_token32 ( uint32_t  mask,
const INK_AUTH_SEED *const *  seeds,
int  slen 
)
uint64_t ink_make_token64 ( uint64_t  mask,
const INK_AUTH_SEED *const *  seeds,
int  slen 
)

Definition at line 76 of file ink_auth_api.cc.

References ink_get_rand_intrn(), ink_make_token_intrn(), and INK_AUTH_TOKEN::u64.

Referenced by ink_make_token64().

void ink_make_token_intrn ( INK_AUTH_TOKEN tok,
const INK_AUTH_SEED *const *  seeds,
int  slen 
) [inline]
static InkRand s_rand_gen ( ink_rand_r((unsigned int *)&s_rand_seed)^(uintptr_t)&  s_rand_seed  )  [static]

Referenced by ink_get_rand_intrn().


Variable Documentation

int s_rand_seed = time(NULL) [static]

Definition at line 30 of file ink_auth_api.cc.