SkySpark by SkyFoundry

const class proj::PasswordManager

sys::Obj
  proj::PasswordManager

PasswordManager manages passwords or HMACs via an obscured props file.

genSalt

const static Str genSalt()

Generate user salt nonce which is 32-byte base64 encoded string.

get

Str? get(Str key)

Get a password/hmac by its key or return null if not found.

hmac

const static Str hmac(Str user, Str pass, Str salt)

Generate SHA-1 HMAC which is "user:salt".hmac(pass). Result is base64 encoded.

remove

Void remove(Str key)

Remove a password by its key.

set

Void set(Str key, Str val)

Set a password/hmac by its key. Password values must ASCII (no unicode allowed).