def METHOD_NAME(
    self, passphrase: str, osname: str = None,
    options: list = None, keyfile: str = '', randomize: bool = True,
    root_dir: str = ''
) -> None:
    """
    Create luks device. Please note the passphrase is readable
    at creation time of this image. Make sure your host system
    is secure while this process runs
    :param string passphrase: credentials
    :param string osname:
        distribution name to match distribution specific
        options for cryptsetup
    :param list options: further cryptsetup options
    :param string keyfile: file path name
        file path name which contains an alternative key
        to unlock the luks device
    :param string root_dir: root dir path
    """
    if not options:
        options = []
    if osname:
        if osname in self.option_map:
            options += self.option_map[osname]
        else:
            raise KiwiLuksSetupError(
                'no custom option configuration found for OS %s' % osname
            )
    extra_options = []
    storage_device = self.storage_provider.get_device()
    log.info('Creating crypto LUKS on %s', storage_device)
    if not passphrase:
        log.warning('Using an empty passphrase for the key setup')
    if randomize:
        log.info('--> Randomizing...')
        storage_size_mbytes = self.storage_provider.get_byte_size(
            storage_device
        ) / 1048576
        Command.run(
            [
                'dd', 'if=/dev/urandom', 'bs=1M',
                'count=%d' % storage_size_mbytes,
                'of=%s' % storage_device
            ]
        )
    log.info('--> Creating LUKS map')
    if passphrase:
        passphrase_file_tmp = Temporary().new_file()
        with open(passphrase_file_tmp.name, 'w') as credentials:
            credentials.write(passphrase)
        passphrase_file = passphrase_file_tmp.name
    else:
        passphrase_file_zero = '/dev/zero'
        extra_options = [
            '--keyfile-size', '32'
        ]
        passphrase_file = passphrase_file_zero
    Command.run(
        [
            'cryptsetup', '-q', '--key-file', passphrase_file
        ] + options + extra_options + [
            'luksFormat', storage_device
        ]
    )
    if keyfile:
        self.luks_keyfile = keyfile
        keyfile_path = os.path.normpath(
            os.sep.join([root_dir, self.luks_keyfile])
        )
        LuksDevice.create_random_keyfile(keyfile_path)
        Command.run(
            [
                'cryptsetup', '--key-file', passphrase_file
            ] + extra_options + [
                'luksAddKey', storage_device, keyfile_path
            ]
        )
    Command.run(
        [
            'cryptsetup', '--key-file', passphrase_file
        ] + extra_options + [
            'luksOpen', storage_device, self.luks_name
        ]
    )
    self.luks_device = '/dev/mapper/' + self.luks_name