Skip to content

florianmari/ShortkeyGeneratorSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Swift Shortkey Generator

This tiny library helps you to generate for you server or client side swift application short YouTube like IDs (e.g. R-aF2RGNTaY). Shortkeys are fixed lenght and URL-safe.

Use

Example usage:

do {
            let shortkey = try generateRandomBase64Bytes()
            return shortkey
        } catch {
            throw error
        }

Shortkeys are random generated bytes string then encoded in Base64. They are supposed to use on exposed IDs in API to prevent enumeration, evaluation of items numbers...

About

Generate YouTube IDs like in Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages