implemented random cipher