generateValue too short?

Hi all! I’m attempting to create a 1 click deployment for my application, and I require a 32 byte (256 bit) secret value.

I’m attempting to use a generateValue environment variable, which should satisfy my requirements based on the documentation found here.

      generateValue: true # will generate a base64-encoded 256-bit secret

For example, this produces the string "5D3LsbzZ30v44VEEoXuHzwJsHcx1lOD1". However, while this string has 32 characters, the secret itself is only 24 bytes, which is too small.

> const base64String = "5D3LsbzZ30v44VEEoXuHzwJsHcx1lOD1";
> const buffer = Buffer.from(base64String, 'base64');
> buffer.length

Am I misunderstanding something? Thanks!

Note, I need a 32 byte secret for use with this library, which requires them.

Hi there,

A fix has been made to generate a base64-encoded 256-bit string rather than a string, which is 32 characters.


Render Support, UTC+10 :australia:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.