Skip to content

Instantly share code, notes, and snippets.

View AlexanderWingard's full-sized avatar

Alexander Wingård AlexanderWingard

View GitHub Profile
make_qry(Chl) ->
%% First we compose two strings:
%% ChlKey = Challenge + Client-Key
%% ChlPid = Challenge + Client-Id zero padded to even 8
Key = "CFHUR$52U_{VIX5T",
Pid = "PROD0101{0RM?UBW",
ChlKey = Chl ++ Key,
ChlPid0 = Chl ++ Pid,
ChlPadL = 8 - (length(ChlPid0) rem 8),
ChlPid1 = ChlPid0 ++ lists:duplicate(ChlPadL, $0),