a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
29 lines
609 B
C#
29 lines
609 B
C#
//
|
|
// Mono.Security.Cryptography.CapiRandomNumberGenerator
|
|
//
|
|
// Authors:
|
|
// Sebastien Pouliot (spouliot@motus.com)
|
|
//
|
|
// Copyright (C) 2003 Motus Technologies Inc. (http://www.motus.com)
|
|
//
|
|
|
|
using System;
|
|
using System.Security.Cryptography;
|
|
|
|
namespace Mono.Security.Cryptography {
|
|
|
|
class CapiRandomNumberGenerator : CapiContext {
|
|
|
|
public CapiRandomNumberGenerator () : base () {}
|
|
|
|
public CapiRandomNumberGenerator (CspParameters cspParams) : base (cspParams) {}
|
|
|
|
public void GenRandom (byte[] data)
|
|
{
|
|
uint l = (uint) data.Length;
|
|
InternalResult = CryptoAPI.CryptGenRandom (Handle, l, data);
|
|
}
|
|
}
|
|
|
|
}
|