Übersicht der Quellen
Stufen
Anforderungen
|
Konzepte
|
Entwurf
|
Entwicklung
|
Qualitätssicherung
|
Lebenszyklus
|
Steuerung
Ziele
Untersuchung
mit Columbo
Integrität von
Datenbanken
Interaktion und
Portierbarkeit
Ergonomie der
Schnittstellen
Angebot
Produkte
Projekt
Beratung
Mittel
Analytik
Modellierung
Sprachen
Algebra
Logik
Hardware
Denken
Kreativität
Zusammenhänge
Gesellschaft
Wirtschaft
Branche
Firma
Benutzer
Quellcodebibliothek
Statistik
Leitseite
products
/
Sources
/
formale Sprachen
/
C
/
Firefox
/
layout
/
reftests
/
svg
/ (
Firefox Browser
Version 153.0.1
©
) Datei vom 27.6.2026 mit Größe 1 kB
Bilddatei
random.cxx
products/Sources/formale Sprachen/C/LibreOffice/sal/osl/w32/random.cxx
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #define _CRT_RAND_S #include
#include
#include
bool osl_get_system_random_data(char* buffer, size_t desired_len) { unsigned int val; /* if unaligned fill to alignment */ if (reinterpret_cast
(buffer) & 3) { size_t len = 4 - (reinterpret_cast
(buffer) & 3); if (len > desired_len) { len = desired_len; } if (rand_s(&val)) { return false; } memcpy(buffer, &val, len); buffer += len; desired_len -= len; } /* fill directly into the buffer as long as we can */ while (desired_len >= 4) { if (rand_s(reinterpret_cast
(buffer))) { return false; } else { buffer += 4; desired_len -= 4; } } /* deal with the partial int reminder to fill */ if (desired_len) { if (rand_s(&val)) { return false; } memcpy(buffer, &val, desired_len); } return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
2026-08-25
Neuigkeiten
Aktuelles
Motto des Tages
Open Source Software
Quellcodebibliothek
Eigene Quellcodes
Fremde Quellcodes
Suchen
Jenseits des Üblichen ....
Besucherstatistik
Statistik
#Sources=277311
#Domains=655579
Impressum
|
Ethik und Gesetz
|
Haftungsausschluß
|
Kontakt
|
Seitenstruktur
|
©
2026 JDD
|