fdo#84938: replace KEYTYPE_ constants with enum

Change-Id: I563cf96f8ca815d6c8ad9f5fe365fc7ce7a2a328
Reviewed-on: https://gerrit.libreoffice.org/12104
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>