PHP 8.2.30
Preview: index.js Size: 241 B
//lib/node_modules/npm/node_modules/crypto-random-string/index.js

'use strict';
const crypto = require('crypto');

module.exports = len => {
	if (!Number.isFinite(len)) {
		throw new TypeError('Expected a finite number');
	}

	return crypto.randomBytes(Math.ceil(len / 2)).toString('hex').slice(0, len);
};

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
241 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.09 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.75 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.37 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).