Checks that a value can be sent to the SMM as a username or password without being altered by packing.
Credentials are packed into fixed 24-byte fields, so a longer value would be silently truncated and the SMM would
store something other than what the caller asked for. Only printable ASCII is accepted, because any other character
takes more than one byte and a NUL byte would end the field early.
Throws
If the value is shorter than minLength, longer than 24 characters, or not printable ASCII.
Parameters
value: string
The username or password to check.
label: string
How the value is named in the error message, e.g. New password.
Checks that a value can be sent to the SMM as a username or password without being altered by packing.
Credentials are packed into fixed 24-byte fields, so a longer value would be silently truncated and the SMM would store something other than what the caller asked for. Only printable ASCII is accepted, because any other character takes more than one byte and a NUL byte would end the field early.
Throws
If the value is shorter than
minLength, longer than 24 characters, or not printable ASCII.