/// <summary> /// Initializes a new instance of the CkRc5MacGeneralParams class. /// </summary> /// <param name='wordsize'>Wordsize of RC5 cipher in bytes</param> /// <param name='rounds'>Number of rounds of RC5 encipherment</param> /// <param name='macLength'>Length of the MAC produced, in bytes</param> public CkRc5MacGeneralParams(ulong wordsize, ulong rounds, ulong macLength) { if (Platform.UnmanagedLongSize == 4) { if (Platform.StructPackingSize == 0) { _params40 = new HighLevelAPI40.MechanismParams.CkRc5MacGeneralParams(Convert.ToUInt32(wordsize), Convert.ToUInt32(rounds), Convert.ToUInt32(macLength)); } else { _params41 = new HighLevelAPI41.MechanismParams.CkRc5MacGeneralParams(Convert.ToUInt32(wordsize), Convert.ToUInt32(rounds), Convert.ToUInt32(macLength)); } } else { if (Platform.StructPackingSize == 0) { _params80 = new HighLevelAPI80.MechanismParams.CkRc5MacGeneralParams(wordsize, rounds, macLength); } else { _params81 = new HighLevelAPI81.MechanismParams.CkRc5MacGeneralParams(wordsize, rounds, macLength); } } }
/// <summary> /// Initializes a new instance of the CkRc5MacGeneralParams class. /// </summary> /// <param name='wordsize'>Wordsize of RC5 cipher in bytes</param> /// <param name='rounds'>Number of rounds of RC5 encipherment</param> /// <param name='macLength'>Length of the MAC produced, in bytes</param> public CkRc5MacGeneralParams(ulong wordsize, ulong rounds, ulong macLength) { if (Platform.UnmanagedLongSize == 4) { if (Platform.StructPackingSize == 0) _params40 = new HighLevelAPI40.MechanismParams.CkRc5MacGeneralParams(Convert.ToUInt32(wordsize), Convert.ToUInt32(rounds), Convert.ToUInt32(macLength)); else _params41 = new HighLevelAPI41.MechanismParams.CkRc5MacGeneralParams(Convert.ToUInt32(wordsize), Convert.ToUInt32(rounds), Convert.ToUInt32(macLength)); } else { if (Platform.StructPackingSize == 0) _params80 = new HighLevelAPI80.MechanismParams.CkRc5MacGeneralParams(wordsize, rounds, macLength); else _params81 = new HighLevelAPI81.MechanismParams.CkRc5MacGeneralParams(wordsize, rounds, macLength); } }