Class SecureKeyBlockBuilder
java.lang.Object
org.jpos.security.SecureKeyBlockBuilder
The builder class to create and parse key block structure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Method Summary
Modifier and TypeMethodDescriptionbuild(CharSequence data) protected static intcalcOptionalHeaderLength(Map<String, String> optHdrs) protected intstatic SecureKeyBlockBuilderparseOptionalHeader(StringReader sr, int numOfBlocks) protected static charreadChar(StringReader sr) protected static StringreadString(StringReader sr, int len) toKeyBlock(SecureKeyBlock skb) with8characterMACVersions(String versions) Configure key block versions with 8 digits key block MAC.
-
Field Details
-
SIZE_KEYBLOCK_VERSION
- See Also:
-
SIZE_KEYBLOCK_LENGTH
- See Also:
-
SIZE_KEYUSAGE
- See Also:
-
SIZE_KEY_VERSION
- See Also:
-
SIZE_NUMOFOPTHDR
- See Also:
-
SIZE_RESERVED
- See Also:
-
SIZE_HEADER
- See Also:
-
SIZE_OPTHDR_ID
- See Also:
-
SIZE_OPTHDR_LENGTH
- See Also:
-
SIZE_HEADER_3DES
- See Also:
-
SIZE_HEADER_AES
- See Also:
-
-
Method Details
-
newBuilder
-
with8characterMACVersions
Configure key block versions with 8 digits key block MAC.Default 8 digits (4 bytes) key block MAC versions are:
- 'A' TR-31:2005 Key block protected using the Key Variant Binding Method
- 'B' TR-31:2010 Key block protected using the Key Derivation Binding Method
- 'C' TR-31:2010 Key block protected using the Key Variant Binding Method
- '0' Proprietary Key block protected using the 3-DES key
- Parameters:
versions- the string with versions characters- Returns:
- This builder instance
-
getMACLength
-
readString
-
readChar
-
parseOptionalHeader
-
calcOptionalHeaderLength
-
build
- Throws:
IllegalArgumentException
-
toKeyBlock
-