public Optional < Field > checkInputDecrypt ( Record record , Field field ) { if ( field . getType ( ) != Field . Type . BYTE_ARRAY ) { getContext ( ) . toError ( record , CRYPTO_02 , field . getType ( ) ) ; return Optional . empty ( ) ; } return Optional . of ( field ) ; }
Checks that the decryption input is a valid type otherwise sends the record to error .