@classmethod
def Load(klass, cfg, entry_group, decryptor):
    """Create a new entry based on an entry group from the database."""
    cfgpath = '{0:d}/'.format(entry_group)
    old_path = cfg.GetPath()
    cfg.SetPath(cfgpath)
    sort_index = cfg.ReadInt('sort_index')
    provider = cfg.Read('provider')
    account = cfg.Read('account')
    encrypted_secret = cfg.Read('secret')
    secret = decryptor.Decrypt(encrypted_secret)
    digits = cfg.ReadInt('digits', 6)
    original_label = cfg.Read('original_label', '')
    if original_label == '':
        original_label = provider + ':' + account
    cfg.SetPath(old_path)
    obj = klass(entry_group, sort_index, provider, account, secret, digits,
        original_label)
    obj.modified = False
    return obj
