Current section
Files
Jump to
Current section
Files
src/glats@internal@util.erl
-module(glats@internal@util).
-compile([no_auto_import, nowarn_unused_vars]).
-export([random_inbox/1]).
-spec random_inbox(binary()) -> binary().
random_inbox(Prefix) ->
Prefix@1 = case Prefix of
<<""/utf8>> ->
<<"_INBOX."/utf8>>;
P ->
P
end,
Rand = begin
_pipe = crypto:strong_rand_bytes(16),
gleam@base:encode64(_pipe, false)
end,
<<Prefix@1/binary, Rand/binary>>.