change from [type] to [HashAlgorithm]