public static ChainingMode getChainMode ( String chainMode ) { if ( chainMode == null ) { return null ; } switch ( chainMode ) { case "cbc" : return ChainingMode . cbc ; case "cfb" : return ChainingMode . cfb ; case "ecb" : return ChainingMode . ecb ; default : LOG . error ( "Uknown chainmode: \"" + chainMode + "\"" ) ; break ; } return null ; }
Returns the ChainMode object matching the String .