I have been searching for an equivalent of the below method/function from .NET for ColdFusion. I have ASP Membership tables with ASP.NET site running on the database. The same database is used for the ColdFusion site. The idea is to develop an ASP site with the current database that has been used by a ColdFusion site. The two sites will run parallel for at least 3-6 months, allowing a user to connect from either one. Creation of a user can also happen on either side. From .NET I have it sorted. But in ColdFusion I am still struggling.
private string GenerateSalt() {
var buf = new byte[16];
(new RNGCryptoServiceProvider()).GetBytes(buf);
return Convert.ToBase64String(buf);
}
I have found something very simple. It may not be the same Crypto Service but it generate the same length and format as the one above.
GenerateSecretKey("AES")
Simple as that. Maybe this may help someone in the future.