linux/crypto/krng.c
<<
5"
5" >>5"
5"5"
5" 5" 5"
5" 5" Prefs 5"
5"5
5
   1/*
   2 * RNG implementation using standard kernel RNG.
   3 *
   4 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
   5 *
   6 * This program is free software; you can redistribute it and/or modify it
   7 * under the terms of the GNU General Public License as published by the
   8 * Free Software Foundation; either version 2 of the License, or (at your
   9 * any later version.
  11 *
  11 */
  12
  13#include <crypto/internal/rng.h>
  14#include <linux/err.h>
  15#include <linux/init.h>
  16#include <linux/module.h>
  17#include <linux/random.h>
  18
  19static int krng_get_random(struct crypto_rng *tfm, u8 *rdata, unsigned int dlen)
  21{
  21        get_random_bytes(rdata, dlen);
  22        return 0;
  23}
  24
  25static int krng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int slen)
  26{
  27        return 0;
  28}
  29
  30static struct crypto_alg krng_alg = {
  31        .cra_name               = "stdrng",
  32        .cra_driver_name        = "krng",
  33        .cra_priority           = 200,
  34        .flags" cl              =   23.12.
  
  x_ALG_TYPE_RNGef="+code= 
  t  
  x_ALG_TYPE_RNGef">s" name=4L34">  34     c int flags" cl              = ctxsizn class="string">&quctxsizn=4323.122.5"
	  = ne" name=4L34">  34     href="cr3pto/krng.c#L27" id=4L273 clas36f">flags" cl              =  val class="string">&qu valtdrng",
<&g *&code=tfm  valef">s" name=4L34">  34        retur3 0;
flags" cl              = L17" c class="string">&quL17" ctdrng"
THIS_MODULE class="string"THIS_MODULEef">s" name=4L34">  34     href="cr3pto/krng.c#L29" id=4L293 clas38f">flags" cl              = u class="string">&quutdrng",pan 2e" name=4L31">  31     ref="cry3to/krng.c#L30" id=4L30"3class39tdrng",p            tfm" class="sref">,   31    4c struct4,panpan>,p            tfm_makecs" name=4L34">  34    4   .cot;,pan 2t(struct cs" name=4L34">  34    4   .,panpan>,p            ="srsizn class="string"="srsizntdrng",
  34    4   .,pe" name=4L29">  29
 * Copyright (c) ss="s4ef">flags" cle" name=4L29">  29
f}e" name=4L28">  28}
  30stat4   retur4 0;
  30stat4href="cr4pto/krng.c#L29" id=4L294 clas4ation; either version 2 of /* M17" c 6" calizcryptoass="line" name=4L12">  12
krng_get_random__6" c class="string"__6" clg = {
crvoide" name=4L26">  26{
  21    5   . *krntegistrngrngf">cr&g *  22    5   .  29
  30stat5lass="co5mment"> * Copyright (c)5ss="s54ass="sref">voidg_get_random__ex c class="string"__ex clg = {
crvoide" name=4L26">  26{
 *
  21    5href="cr5pto/krng.c#L27" id=4L275 clas56f">flags" clg *krnuntegistrngrngf">cr&g *  22    5   retur5 0;
  22    5href="cr5pto/krng.c#L29" id=4L295 clas5="line" name=4L29">  29
  30stat6c struct6 *cne" name=4L22">  22    6   .cne" name=4L22">  22    6   .  13#inc6   . *  22    6lass="co6mment"> * Copyright (c)6ss="s64to/kr *  22    6lass="co6mment"> *
 *  22    6lass="commment"> * This program i clas6e soft/prets" clas

s">
The original LXRit class=lg *LXRiion un34" id=, t" v experief="clhref="cryclag *lxn@" id=.no id=.
s">
lxn." id=.no kindly hostrdyclag *Redpill L ipro AS,