SHAVP1 algorithm

This algorithm is used by the Key Test2 callable service to generate and verify the verification pattern.

VP = Trunc128( SHA256( KA || KT || KL || K ))
where:
VP
Is the 128-bit verification pattern
TruncN(x)
Is truncation of the string x to the left most N bits
SHA256(x)
is the SHA-256 hash of the string x
KA
Is the one-byte CCA variable-length key token constant for the algorithm of key (HMAC X'03')
KT
Is the two-byte CCA variable-length key token constant for the type of key (MAC X'0002')
KL
Is the two-byte bit length of the clear key value
K
Is the clear key value left-aligned and padded on the right with binary zeros to byte boundary
||
Is string concatenation