luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.59k stars 156 forks source link

Adds the ability to configure the secret key size generated. #1856

Closed jwoertink closed 6 months ago

jwoertink commented 6 months ago

Purpose

Fixes #1847

Description

This allows you to pass an optional argument to the lucky gen.secret_key task to generate larger or smaller secret keys.

❯ lucky gen.secret_key
jyy8PODnOkPBUKVFd8pxM4YFbxyYTzYK44QoMiha+68=

❯ lucky gen.secret_key -n 64
uOBfVEGWo+t14g7F9vDA349b2OTURQAMfM13VeiMswNsd0YA0oykDP4XEzJcEjTk3PNV8KuiLwAMV4Vg7EhU3A==

Checklist