{"id":23168844,"url":"https://github.com/chris-huxtable/cbhrandomkit","last_synced_at":"2025-10-25T08:38:08.890Z","repository":{"id":56904208,"uuid":"44413960","full_name":"chris-huxtable/CBHRandomKit","owner":"chris-huxtable","description":" An easier \u0026 safer to use interface for cryptographically secure random.","archived":false,"fork":false,"pushed_at":"2019-12-05T08:14:05.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-11T15:52:45.985Z","etag":null,"topics":["objective-c","objective-c-library","random-generation","random-number-generators"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chris-huxtable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-16T22:27:42.000Z","updated_at":"2019-12-05T08:14:07.000Z","dependencies_parsed_at":"2022-08-20T19:20:28.871Z","dependency_job_id":null,"html_url":"https://github.com/chris-huxtable/CBHRandomKit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-huxtable%2FCBHRandomKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-huxtable%2FCBHRandomKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-huxtable%2FCBHRandomKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-huxtable%2FCBHRandomKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-huxtable","download_url":"https://codeload.github.com/chris-huxtable/CBHRandomKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261581,"owners_count":20910107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["objective-c","objective-c-library","random-generation","random-number-generators"],"created_at":"2024-12-18T03:13:51.643Z","updated_at":"2025-10-25T08:38:03.847Z","avatar_url":"https://github.com/chris-huxtable.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CBHRandomKit\n\n[![release](https://img.shields.io/github/release/chris-huxtable/CBHRandomKit.svg)](https://github.com/chris-huxtable/CBHRandomKit/releases)\n[![pod](https://img.shields.io/cocoapods/v/CBHRandomKit.svg)](https://cocoapods.org/pods/CBHRandomKit)\n[![licence](https://img.shields.io/badge/licence-ISC-lightgrey.svg?cacheSeconds=2592000)](https://github.com/chris-huxtable/CBHRandomKit/blob/master/LICENSE)\n[![coverage](https://img.shields.io/badge/coverage-99%25-brightgreen.svg?cacheSeconds=2592000)](https://github.com/chris-huxtable/CBHRandomKit)\n\nAn easier and safer to use interface for good, cryptographically secure, random.\n\n\n## Use\n\n`CBHRandom` provides class methods for producing random data of fixed and variable length with bounding constraints.\n\n#### Example:\n\nGenerate a random `NSUInteger`:\n```objective-c\nNSUInteger randInt = [CBHRandom randomUnsignedInteger];\n```\n\nGenerate a random `NSUInteger` less then 128 inclusive:\n```objective-c\nNSUInteger randInt = [CBHRandom randomUnsignedIntegerWithBound:128];\n```\n\nGenerate a random `NSUInteger` between 64 and 128 inclusive:\n```objective-c\nNSUInteger randInt = [CBHRandom randomIntegerBetweenLower:64 andUpperBound:128];\n```\n\nShuffling an Array:\n```objective-c\nNSArray *array = @[@1, @2, @3, @4, @5];\nNSArray *shuffledArray = [array arrayByShuffling];\n```\n\nShuffling an Array in-place:\n```objective-c\nNSMutableArray *array = [NSMutableArray arrayWithObjects:@1, @2, @3, @4, @5, nil];\n[array shuffle];\n```\n\nRequesting a random object from Array:\n```objective-c\nNSArray *array = @[@1, @2, @3, @4, @5];\nNSNumber *number = [array randomObject];\n```\n\n\n## Licence\nCBHRandomKit is available under the [ISC license](https://github.com/chris-huxtable/CBHRandomKit/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-huxtable%2Fcbhrandomkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-huxtable%2Fcbhrandomkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-huxtable%2Fcbhrandomkit/lists"}