mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Secret IDs identify a secret in the store. Tooling (pvsecret) calculates them by hashing a user-defined string. With this patch it is now possible to skip the hash step and directly use the input string as the ID. Up to the first 31 bytes of the input ASCII-string are used. The last byte is the NUL char. During list pvsecret tries to interpret the secret as ASCII string and if possible displays the ASCII characters alongside the hex number. Also, use the Upper/Lower Hex formatters for the hexstring formatting of SecretId. Display will, additionally show the ASCII representation if applicable. While at it, use Self wherever possible. Acked-by: Marc Hartmayer <marc@linux.ibm.com> Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>