Added crypto functions