Ticket #10134: 0001-Added-Disk-image-menu-register-unregister-disk-image.2.patch

File 0001-Added-Disk-image-menu-register-unregister-disk-image.2.patch, 57.6 KB (added by dsjonny, 6 years ago)
  • src/apps/drivesetup/DiskView.cpp

    From c5f5c50d7e29c9a3a7c8abec34276b40875d2c71 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Dancs=C3=B3=20R=C3=B3bert?= <dancso.robert@d-rendszer.hu>
    Date: Sat, 14 Dec 2013 22:33:35 +0100
    Subject: [PATCH] Added Disk image menu: register/unregister disk images, save
     partition to an image, write image to a partition. Added drop disk images to
     register images quickly. Added BitLocker/PGP/SafeBoot/LUKS encryption
     detection. If only one disk is in the list, DriveSetup automatically select
     it. Added icons for the boot/readonly/shared/encrypted/virtual
     drives/partitions. Show with a different color if the drive is
     boot/BFS/encrypted. Indicate the used space on the disk map. Added more
     partition info to the Parameters column.
    
    Added free space and block size column.
    ---
     src/apps/drivesetup/DiskView.cpp      | 157 +++++++++++-
     src/apps/drivesetup/Jamfile           |   2 +-
     src/apps/drivesetup/MainWindow.cpp    | 452 +++++++++++++++++++++++++++++++++-
     src/apps/drivesetup/MainWindow.h      |  15 ++
     src/apps/drivesetup/PartitionList.cpp | 138 +++++++++--
     src/apps/drivesetup/icons.h           | 356 ++++++++++++++++++++++++++
     6 files changed, 1090 insertions(+), 30 deletions(-)
     create mode 100644 src/apps/drivesetup/icons.h
    
    diff --git a/src/apps/drivesetup/DiskView.cpp b/src/apps/drivesetup/DiskView.cpp
    index 8980cfe..7be43b0 100644
    a b  
    77
    88#include <stdio.h>
    99
     10#include <Application.h>
     11#include <Bitmap.h>
    1012#include <DiskDeviceVisitor.h>
    1113#include <Catalog.h>
    1214#include <GroupLayout.h>
    1315#include <HashMap.h>
     16#include <IconUtils.h>
    1417#include <LayoutItem.h>
    1518#include <Locale.h>
    1619#include <PartitioningInfo.h>
     20#include <Path.h>
     21#include <Resources.h>
    1722#include <String.h>
     23#include <Volume.h>
     24#include <VolumeRoster.h>
    1825
     26#include "icons.h"
    1927#include "MainWindow.h"
    2028
    2129
    static const float kLayoutInset = 6; 
    3442class PartitionView : public BView {
    3543public:
    3644    PartitionView(const char* name, float weight, off_t offset,
    37             int32 level, partition_id id)
     45            int32 level, partition_id id, BPartition* partition)
    3846        :
    3947        BView(name, B_WILL_DRAW | B_SUPPORTS_LAYOUT | B_FULL_UPDATE_ON_RESIZE),
    4048        fID(id),
    public: 
    6371        fGroupLayout->SetInsets(kLayoutInset, kLayoutInset + font.Size(),
    6472            kLayoutInset, kLayoutInset);
    6573
    66         SetExplicitMinSize(BSize(font.Size() + 6, 30));
     74        SetExplicitMinSize(BSize(font.Size() + 20, 30));
     75
     76        fName = name;
     77
     78        BVolume v;
     79        partition->GetVolume(&v);
     80
     81        BVolume boot;
     82        BVolumeRoster().GetBootVolume(&boot);
     83        fBoot = v == boot;
     84        fReadOnly = v.IsReadOnly();
     85        fShared = v.IsShared();
     86
     87        BPath path;
     88        partition->GetPath(&path);
     89       
     90        if (partition->Device()->IsFile()) {
     91            fName = B_TRANSLATE("Virtual");
     92            fVirtual = true;
     93        }
     94        else fVirtual = false;
     95
     96        char e[16];
     97        BString enc;
     98        BFile(path.Path(), B_READ_ONLY).ReadAt(0, &e, 11);
     99        enc.Append(e);
     100
     101        if (enc.EndsWith("-FVE-FS-")) {
     102            fName = B_TRANSLATE("BitLocker encrypted");
     103            fEncrypted = true;
     104        }
     105        else if (enc.EndsWith("PGPGUARD")) {
     106            fName = B_TRANSLATE("PGP encrypted");
     107            fEncrypted = true;
     108        }
     109        else if (enc.EndsWith("SafeBoot")) {
     110            fName = B_TRANSLATE("SafeBoot encrypted");
     111            fEncrypted = true;
     112        }
     113        else if (enc.StartsWith("LUKS")) {
     114            fName = B_TRANSLATE("LUKS encrypted");
     115            fEncrypted = true;
     116        }
     117        else fEncrypted = false;
     118       
     119        if (partition->Parent() != NULL) {
     120            partition->GetPath(&path);
     121
     122            BFile(path.Path(), B_READ_ONLY).ReadAt(3, &e, 8);
     123            enc.Append(e);
     124
     125            if (enc.StartsWith("-FVE-FS-")) {
     126                fName = B_TRANSLATE("BitLocker encrypted");
     127                fEncrypted = true;
     128            }
     129            else if (enc.StartsWith("PGPGUARD")) {
     130                fName = B_TRANSLATE("PGP encrypted");
     131                fEncrypted = true;
     132            }
     133            else if (enc.StartsWith("SafeBoot")) {
     134                fName = B_TRANSLATE("SafeBoot encrypted");
     135                fEncrypted = true;
     136                }
     137            else fEncrypted = false;
     138        }
     139       
     140        fUsed = 100.0 / ((float)v.Capacity() / (v.Capacity() - v.FreeBytes()));
     141        if (fUsed < 0) fUsed = 100.0;
     142
     143        fIcon = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32);
     144
     145        fBFS = BString(partition->ContentType()) == "Be File System";
     146
     147        if (fBoot) BIconUtils::GetVectorIcon(kLeaf, sizeof(kLeaf), fIcon);
     148        else if (fEncrypted) BIconUtils::GetVectorIcon(kEncrypted, sizeof(kEncrypted), fIcon);
     149        else if (fReadOnly) BIconUtils::GetVectorIcon(kReadOnly, sizeof(kReadOnly), fIcon);
     150        else if (fShared) BIconUtils::GetVectorIcon(kShared, sizeof(kShared), fIcon);
     151        else if (fVirtual) BIconUtils::GetVectorIcon(kFile, sizeof(kFile), fIcon);
     152        else fIcon = NULL;
    67153    }
    68154
    69155    virtual void MouseDown(BPoint where)
    public: 
    94180
    95181        BRect b(Bounds());
    96182        if (fSelected) {
    97             SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR));
     183            if (fReadOnly) SetHighColor(make_color(255, 128, 128));
     184            else if (fBoot || fBFS) SetHighColor(make_color(128, 255, 128));
     185            else SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR));
    98186            StrokeRect(b, B_SOLID_HIGH);
    99187            b.InsetBy(1, 1);
    100188            StrokeRect(b, B_SOLID_HIGH);
    101189            b.InsetBy(1, 1);
    102         } else if (fLevel > 0) {
     190        } else if (fLevel >= 0) {
    103191            StrokeRect(b, B_SOLID_HIGH);
    104192            b.InsetBy(1, 1);
    105193        }
    106194
     195        if (CountChildren() == 0) SetLowColor(make_color(255, 255, 255));
    107196        FillRect(b, B_SOLID_LOW);
    108197
    109         // prevent the text from moving when border width changes
    110         if (!fSelected)
    111             b.InsetBy(1, 1);
     198        if (fEncrypted && CountChildren() == 0) {
     199            SetHighColor(make_color(128, 128, 128));
     200            StrokeRect(b, B_SOLID_HIGH);
     201            b.InsetBy(1, 1);
     202            SetLowColor(make_color(224, 224, 0));
     203            BRect e(BPoint(15, b.top), b.RightBottom());
     204            e.InsetBy(1, 1);
     205            FillRect(e, kStripes);
     206        }
     207
     208        if (!fSelected) b.InsetBy(1, 1);
     209       
     210        BRect used(b.LeftTop(), BSize(b.Width() / (100.0 / fUsed), b.Height()));
     211
     212        SetLowColor(make_color(240, 248, 255));
     213
     214        if (fReadOnly) SetLowColor(make_color(255, 224, 224));
     215        if (fBoot || fBFS) SetLowColor(make_color(224, 255, 224));
     216        if (CountChildren() == 0) FillRect(used, B_SOLID_LOW);
     217
     218        if (fIcon && CountChildren() == 0) {
     219            BPoint where = b.RightBottom() - BPoint(fIcon->Bounds().Width(), fIcon->Bounds().Height());
     220            SetDrawingMode(B_OP_OVER);
     221            DrawBitmap(fIcon, where);
     222            SetDrawingMode(B_OP_COPY);
     223        }
    112224
    113225        float width;
    114226        BFont font;
    public: 
    134246        }
    135247
    136248        BString name(Name());
     249        if (fEncrypted && CountChildren() == 0) name.SetTo(fName);
     250        else if (fEncrypted) name << " (" << fName << ")";
     251        else if (fVirtual) name << " (" << fName << ")";
    137252        font.TruncateString(&name, B_TRUNCATE_END, width);
    138253
    139254        SetHighColor(tint_color(LowColor(), B_DARKEN_4_TINT));
    public: 
    168283        fSelected = selected;
    169284        Invalidate();
    170285    }
     286   
     287    bool IsEncrypted() {
     288        return fEncrypted;
     289    }
    171290
    172291private:
    173292    void _SetMouseOver(bool mouseOver)
    private: 
    186305    bool            fSelected;
    187306    bool            fMouseOver;
    188307    BGroupLayout*   fGroupLayout;
     308    bool            fBoot;
     309    bool            fReadOnly;
     310    bool            fShared;
     311    bool            fEncrypted;
     312    bool            fVirtual;
     313    float           fUsed;
     314    const char*     fName;
     315    bool            fBFS;
     316    BBitmap*        fIcon;
    189317};
    190318
    191319
    public: 
    208336        else
    209337            name = B_TRANSLATE("Device");
    210338
     339        if (BString(device->ContentName()).Length() > 0) name = device->ContentName();
     340
    211341        PartitionView* view = new PartitionView(name, 1.0,
    212             device->Offset(), 0, device->ID());
     342            device->Offset(), 0, device->ID(), device);
    213343        fViewMap.Put(device->ID(), view);
    214344        fView->GetLayout()->AddView(view);
    215345        _AddSpaces(device, view);
    public: 
    242372        }
    243373        partition_id id = partition->ID();
    244374        PartitionView* view = new PartitionView(name.String(), scale, offset,
    245             level, id);
     375            level, id, partition);
    246376        view->SetSelected(id == fSelectedPartition);
    247377        PartitionView* parent = fViewMap.Get(partition->Parent()->ID());
    248378        BGroupLayout* layout = parent->GroupLayout();
    public: 
    296426                double scale = (double)size / parentSize;
    297427                partition_id id
    298428                    = fSpaceIDMap.SpaceIDFor(partition->ID(), offset);
    299                 PartitionView* view = new PartitionView(B_TRANSLATE("<empty>"),
    300                     scale, offset, parentView->Level() + 1, id);
     429                PartitionView* view = new PartitionView(B_TRANSLATE("<empty or unknown>"),
     430                    scale, offset, parentView->Level() + 1, id, partition);
    301431
    302432                fViewMap.Put(id, view);
    303433                BGroupLayout* layout = parentView->GroupLayout();
    void 
    434564DiskView::SetDiskCount(int32 count)
    435565{
    436566    fDiskCount = count;
     567    if (count == 1) {
     568        BMessage message(MSG_SELECTED_PARTITION_ID);
     569        message.AddInt32("partition_id", 0);
     570        Window()->PostMessage(&message);
     571    }
    437572}
    438573
    439574
  • src/apps/drivesetup/Jamfile

    diff --git a/src/apps/drivesetup/Jamfile b/src/apps/drivesetup/Jamfile
    index cb003fa..086ac1f 100644
    a b Preference DriveSetup : 
    1515    PartitionList.cpp
    1616    Support.cpp
    1717
    18     : be localestub libcolumnlistview.a libshared.a
     18    : be localestub tracker libcolumnlistview.a libshared.a
    1919        $(TARGET_LIBSUPC++)
    2020    : DriveSetup.rdef
    2121;
  • src/apps/drivesetup/MainWindow.cpp

    diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp
    index 94b6115..11a58a8 100644
    a b  
    1313
    1414#include "MainWindow.h"
    1515
     16#include <errno.h>
    1617#include <stdio.h>
    1718#include <string.h>
    1819
     
    2122#include <Catalog.h>
    2223#include <ColumnListView.h>
    2324#include <ColumnTypes.h>
     25#include <ControlLook.h>
    2426#include <Debug.h>
    2527#include <DiskDevice.h>
     28#include <DiskDeviceRoster.h>
    2629#include <DiskDeviceVisitor.h>
    2730#include <DiskDeviceTypes.h>
    2831#include <DiskSystem.h>
     32#include <LayoutBuilder.h>
    2933#include <Locale.h>
    3034#include <MenuItem.h>
    3135#include <MenuBar.h>
    enum { 
    6771    MSG_EJECT                   = 'ejct',
    6872    MSG_SURFACE_TEST            = 'sfct',
    6973    MSG_RESCAN                  = 'rscn',
     74    MSG_REGISTER                = 'regi',
     75    MSG_UNREGISTER              = 'unrg',
     76    MSG_SAVE                    = 'save',
     77    MSG_WRITE                   = 'writ',
    7078
    7179    MSG_PARTITION_ROW_SELECTED  = 'prsl',
    7280};
    MainWindow::MainWindow() 
    235243    fMountAllMenuItem = new BMenuItem(B_TRANSLATE("Mount all"),
    236244        new BMessage(MSG_MOUNT_ALL), 'M', B_SHIFT_KEY);
    237245
     246    fRegisterMenuItem = new BMenuItem(
     247        B_TRANSLATE("Register disk image" B_UTF8_ELLIPSIS),
     248        new BMessage(MSG_REGISTER));
     249    fUnRegisterMenuItem = new BMenuItem(
     250        B_TRANSLATE("Unregister disk image"),
     251        new BMessage(MSG_UNREGISTER));
     252    fSaveMenuItem = new BMenuItem(
     253        B_TRANSLATE("Save image" B_UTF8_ELLIPSIS),
     254        new BMessage(MSG_SAVE));
     255    fWriteMenuItem = new BMenuItem(
     256        B_TRANSLATE("Write image" B_UTF8_ELLIPSIS),
     257        new BMessage(MSG_WRITE));
     258
    238259    // Disk menu
    239260    fDiskMenu = new BMenu(B_TRANSLATE("Disk"));
    240261
    MainWindow::MainWindow() 
    270291    fPartitionMenu->AddItem(fMountAllMenuItem);
    271292    fMenuBar->AddItem(fPartitionMenu);
    272293
     294    // Disk image menu
     295    fDiskImageMenu = new BMenu(B_TRANSLATE("Disk image"));
     296
     297    fDiskImageMenu->AddItem(fRegisterMenuItem);
     298    fDiskImageMenu->AddItem(fUnRegisterMenuItem);
     299
     300    fDiskImageMenu->AddSeparatorItem();
     301
     302    fDiskImageMenu->AddItem(fSaveMenuItem);
     303    fDiskImageMenu->AddItem(fWriteMenuItem);
     304
     305    fMenuBar->AddItem(fDiskImageMenu);
     306
    273307    AddChild(fMenuBar);
    274308
    275309    // Partition / Drives context menu
    MainWindow::MainWindow() 
    317351    fListView->SetTarget(this);
    318352    fListView->MakeFocus(true);
    319353
     354    fFileOpen = NULL;
     355
    320356    status_t status = fDiskDeviceRoster.StartWatching(BMessenger(this));
    321357    if (status != B_OK) {
    322358        fprintf(stderr, "Failed to start watching for device changes: %s\n",
    MainWindow::~MainWindow() 
    339375}
    340376
    341377
     378status_t
     379MainWindow::register_file_disk_device(const char* fileName)
     380{
     381    BString message;
     382
     383    struct stat st;
     384    if (lstat(fileName, &st) != 0) {
     385        status_t error = errno;
     386
     387        message.SetTo(B_TRANSLATE("Failed to stat() %s"));
     388        message.ReplaceFirst("%s", fileName);
     389        BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     390            B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     391        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     392        alert->Go(NULL);
     393        return error;
     394    }
     395
     396    if (!S_ISREG(st.st_mode)) {
     397        message.SetTo(B_TRANSLATE("%s is not a regular file."));
     398        message.ReplaceFirst("%s", fileName);
     399        BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     400            B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     401        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     402        alert->Go(NULL);
     403        return B_BAD_VALUE;
     404    }
     405
     406    // register the file
     407    BDiskDeviceRoster roster;
     408    partition_id id = roster.RegisterFileDevice(fileName);
     409    if (id < 0) {
     410        message.SetTo(B_TRANSLATE("Failed to register file disk device: %s"));
     411        message.ReplaceFirst("%s", fileName);
     412        BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     413            B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     414        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     415        alert->Go(NULL);
     416        return id;
     417    }
     418
     419    // print the success message (get the device path)
     420    BDiskDevice device;
     421    BPath path;
     422    if (roster.GetDeviceWithID(id, &device) == B_OK
     423        && device.GetPath(&path) == B_OK) {
     424    } else {
     425        message.SetTo(B_TRANSLATE("Registered file as disk device, but failed to get the device path."));
     426        BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     427            B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
     428        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     429        alert->Go(NULL);
     430    }
     431
     432    return B_OK;
     433}
     434
     435
     436status_t
     437MainWindow::unregister_file_disk_device(const char* fileNameOrID)
     438{
     439    BString message;
     440
     441    // try to parse the parameter as ID
     442    char* numberEnd;
     443    partition_id id = strtol(fileNameOrID, &numberEnd, 0);
     444    BDiskDeviceRoster roster;
     445    if (id >= 0 && numberEnd != fileNameOrID && *numberEnd == '\0') {
     446        BDiskDevice device;
     447        if (roster.GetDeviceWithID(id, &device) == B_OK && device.IsFile()) {
     448            status_t error = roster.UnregisterFileDevice(id);
     449            if (error != B_OK) {
     450                message.SetTo(B_TRANSLATE("Failed to unregister file disk device."));
     451                BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     452                    B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     453                alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     454                alert->Go(NULL);
     455                return error;
     456            }
     457
     458            message.SetTo(B_TRANSLATE("Unregistered file disk device."));
     459            BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     460                B_WIDTH_FROM_WIDEST, B_INFO_ALERT);
     461            alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     462            alert->Go(NULL);
     463            return B_OK;
     464        } else {
     465            message.SetTo(B_TRANSLATE("No file disk device found with the given ID, trying file %s"));
     466            message.ReplaceFirst("%s", fileNameOrID);
     467            BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     468                B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
     469            alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     470            alert->Go(NULL);
     471        }
     472    }
     473
     474    // the parameter must be a file name -- stat() it
     475    struct stat st;
     476    if (lstat(fileNameOrID, &st) != 0) {
     477        status_t error = errno;
     478        message.SetTo(B_TRANSLATE("Failed to stat() \"%s\""));
     479        message.ReplaceFirst("%s", fileNameOrID);
     480        BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     481            B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     482        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     483        alert->Go(NULL);
     484        return error;
     485    }
     486
     487    // remember the volume and node ID, so we can identify the file
     488    // NOTE: There's a race condition -- we would need to open the file and
     489    // keep it open to avoid it.
     490    dev_t volumeID = st.st_dev;
     491    ino_t nodeID = st.st_ino;
     492
     493    // iterate through all file disk devices and try to find a match
     494    BDiskDevice device;
     495    while (roster.GetNextDevice(&device) == B_OK) {
     496        if (!device.IsFile())
     497            continue;
     498
     499        // get file path and stat it, same for the device path
     500        BPath path;
     501        bool isFilePath = true;
     502        if ((device.GetFilePath(&path) == B_OK && lstat(path.Path(), &st) == 0
     503                && volumeID == st.st_dev && nodeID == st.st_ino)
     504            || (isFilePath = false, false)
     505            || (device.GetPath(&path) == B_OK && lstat(path.Path(), &st) == 0
     506                && volumeID == st.st_dev && nodeID == st.st_ino)) {
     507            status_t error = roster.UnregisterFileDevice(device.ID());
     508            if (error != B_OK) {
     509                message.SetTo(B_TRANSLATE("Failed to unregister file disk device %s"));
     510                message.ReplaceFirst("%s", fileNameOrID);
     511                BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     512                    B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     513                alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     514                alert->Go(NULL);
     515                return error;
     516            }
     517            return B_OK;
     518        }
     519    }
     520
     521    message.SetTo(B_TRANSLATE("%s does not refer to a file disk device."));
     522    message.ReplaceFirst("%s", fileNameOrID);
     523    BAlert* alert = new BAlert("error", message.String(), B_TRANSLATE("OK"), NULL, NULL,
     524        B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
     525    alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     526    alert->Go(NULL);
     527    return B_BAD_VALUE;
     528}
     529
     530
     531int32
     532MainWindow::SaveDiskImage(void* data)
     533{
     534    BMessage* msg = (BMessage*)data;
     535    const char* sourcepath;
     536    const char* targetpath;
     537    const char* targetfolder;
     538    int32 partitionID;
     539
     540    msg->FindString("source", &sourcepath);
     541    msg->FindString("target", &targetpath);
     542    msg->FindString("targetfolder", &targetfolder);
     543    msg->FindInt32("partitionID", &partitionID);
     544
     545    BFile source(sourcepath, B_READ_ONLY);
     546    BFile target(targetpath, B_READ_WRITE | B_CREATE_FILE);
     547    BAlert* alert;
     548
     549    if (source.InitCheck() != B_OK) {
     550        alert = new BAlert("error", B_TRANSLATE("Cannot init source volume."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     551        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     552        alert->Go(NULL);
     553        return -1;
     554    }
     555
     556    if (target.InitCheck() != B_OK) {
     557        alert = new BAlert("error", B_TRANSLATE("Cannot init target file."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     558        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     559        alert->Go(NULL);
     560        return -1;
     561    }
     562   
     563    BDirectory* targetdir = new BDirectory(targetfolder);
     564    node_ref node;
     565    targetdir->GetNodeRef(&node);
     566    BVolume volume(node.device);
     567
     568    if (volume.InitCheck()) {
     569        alert = new BAlert("error", B_TRANSLATE("Cannot init target volume."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     570        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     571        alert->Go(NULL);
     572        return -1;
     573    }
     574
     575    if (volume.IsReadOnly()) {
     576        alert = new BAlert("error", B_TRANSLATE("Target volume is readonly."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     577        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     578        alert->Go(NULL);
     579        return -1;
     580    }
     581
     582    BPartition *partition;
     583    BDiskDevice device;
     584
     585    BDiskDeviceRoster().GetPartitionWithID(partitionID, &device, &partition);
     586
     587    if (volume.FreeBytes() < partition->Size()) {
     588        alert = new BAlert("error", B_TRANSLATE("There is no enught free space on target device."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     589        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     590        alert->Go(NULL);
     591        return -1;
     592    }
     593
     594    alert = new BAlert("ok", B_TRANSLATE("Please wait while saving the image. It may take a long time."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_INFO_ALERT);
     595    alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     596    alert->Go(NULL);
     597
     598    size_t bufsize = partition->BlockSize();
     599    char* buffer = new char[bufsize];
     600    try {
     601        while (true) {
     602            ssize_t bytes = source.Read(buffer, bufsize);
     603
     604            if (bytes > 0) {
     605                ssize_t result = target.Write(buffer, (size_t)bytes);
     606                if (result != bytes) throw (status_t)B_ERROR;
     607                else if (bytes < 0) throw (status_t)bytes;
     608            }
     609            else break;
     610        }
     611    } catch (...) {
     612        delete [] buffer;
     613        throw;
     614    }
     615
     616    alert = new BAlert("ok", B_TRANSLATE("Disk image successfully created."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_INFO_ALERT);
     617    alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     618    alert->Go(NULL);
     619   
     620    return 0;
     621}
     622
     623
     624int32
     625MainWindow::WriteDiskImage(void* data)
     626{
     627    BMessage* msg = (BMessage*)data;
     628    const char* sourcepath;
     629    const char* targetpath;
     630
     631    msg->FindString("source", &sourcepath);
     632    msg->FindString("target", &targetpath);
     633
     634    BFile source(sourcepath, B_READ_ONLY);
     635    BFile target(targetpath, B_READ_WRITE);
     636    BAlert* alert;
     637
     638    if (target.InitCheck() != B_OK) {
     639        alert = new BAlert("error", B_TRANSLATE("Cannot init target partition."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     640        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     641        alert->Go(NULL);
     642        return -1;
     643    }
     644
     645    BPartition *partition;
     646    BDiskDevice device;
     647
     648    BDiskDeviceRoster().GetPartitionForPath(targetpath, &device, &partition);
     649
     650    if (partition->IsReadOnly()) {
     651        alert = new BAlert("error", B_TRANSLATE("Target partition is readonly."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     652        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     653        alert->Go(NULL);
     654        return -1;
     655    }
     656
     657    off_t size;
     658    source.GetSize(&size);
     659
     660    if (partition->Size() < size) {
     661        alert = new BAlert("error", B_TRANSLATE("The target partition is smaller than the image file."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     662        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     663        alert->Go(NULL);
     664        return -1;
     665    }
     666
     667    alert = new BAlert("ok", B_TRANSLATE("Please wait while writing the image. It may take a long time."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_INFO_ALERT);
     668    alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     669    alert->Go(NULL);
     670
     671    size_t bufsize = partition->BlockSize();
     672    char* buffer = new char[bufsize];
     673    try {
     674        while (true) {
     675            ssize_t bytes = source.Read(buffer, bufsize);
     676
     677            if (bytes > 0) {
     678                ssize_t result = target.Write(buffer, (size_t)bytes);
     679                if (result != bytes) throw (status_t)B_ERROR;
     680                else if (bytes < 0) throw (status_t)bytes;
     681            }
     682            else break;
     683        }
     684    } catch (...) {
     685        delete [] buffer;
     686        throw;
     687    }
     688
     689    alert = new BAlert("ok", B_TRANSLATE("Disk image successfully written to the target."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_INFO_ALERT);
     690    alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
     691    alert->Go(NULL);
     692   
     693    return 0;
     694}
     695
     696
    342697void
    343698MainWindow::MessageReceived(BMessage* message)
    344699{
    MainWindow::MessageReceived(BMessage* message) 
    429784                    true, false, true);
    430785            break;
    431786        }
     787        case MSG_REGISTER: {
     788            entry_ref entryRef;
     789            message->FindRef("refs", &entryRef);
     790            BEntry entry(&entryRef);
     791            BPath path;
     792            if (entry.GetPath(&path) == B_OK) {
     793                register_file_disk_device(path.Path());
     794                break;
     795            }
     796            fFileOpen = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, new BMessage(MSG_REGISTER), NULL, true);
     797            fFileOpen->Show();
     798            break;
     799        }
     800        case MSG_UNREGISTER: {
     801            BPath path;
     802            fCurrentDisk->GetPath(&path);
     803            unregister_file_disk_device(path.Path());
     804            break;
     805        }
     806        case MSG_WRITE: {
     807            entry_ref entryRef;
     808            message->FindRef("refs", &entryRef);
     809            BEntry entry(&entryRef);
     810            BPath path;
     811            if (entry.GetPath(&path) == B_OK) {
     812                BMessage* msg = new BMessage();
     813
     814                PartitionListRow* row = dynamic_cast<PartitionListRow*>(fListView->CurrentSelection());
     815
     816                msg->AddString("source", path.Path());
     817                msg->AddString("target", row->DevicePath());
     818
     819                thread_id write_thread = spawn_thread(WriteDiskImage, "WriteDiskImage", B_LOW_PRIORITY, (void*)msg);
     820                resume_thread(write_thread);
     821            }
     822            else {
     823                fFileOpen = new BFilePanel(B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, new BMessage(MSG_WRITE), NULL, true);
     824                fFileOpen->Show();
     825            }
     826            break;
     827        }
     828        case MSG_SAVE: {
     829            fFileOpen = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false, NULL, NULL, true);
     830            fFileOpen->Show();
     831            break;
     832        }
     833        case B_SAVE_REQUESTED: {
     834            BMessage* msg = new BMessage();
     835
     836            entry_ref entryRef;
     837            message->FindRef("directory", &entryRef);
     838            BEntry entry(&entryRef);
     839            BPath path;
     840            entry.GetPath(&path);
     841            msg->AddString("targetfolder", path.Path());
     842            const char* name;
     843            message->FindString("name", &name);
     844            path.Append(name);
     845
     846            PartitionListRow* row = dynamic_cast<PartitionListRow*>(fListView->CurrentSelection());
     847           
     848            msg->AddString("source", row->DevicePath());
     849            msg->AddString("target", path.Path());
     850            msg->AddInt32("partitionID", row->ID());
     851           
     852            thread_id save_thread = spawn_thread(SaveDiskImage, "SaveDiskImage", B_LOW_PRIORITY, (void*)msg);
     853            resume_thread(save_thread);
     854
     855            break;
     856        }
    432857
    433858        case MSG_UPDATE_ZOOM_LIMITS:
    434859            _UpdateWindowZoomLimits();
    435860            break;
    436861
    437         default:
     862 
     863        default:
     864            entry_ref ref;
     865            int32 i = 0;
     866
     867            while (message->FindRef("refs", i++, &ref) == B_OK) {
     868                BEntry entry(&ref, true);
     869                BPath path(&entry);
     870                BNode node(&entry);
     871
     872                if (node.IsFile()) {
     873                    if (entry.GetPath(&path) == B_OK) {
     874                        register_file_disk_device(path.Path());
     875                    }
     876                }
     877            }
    438878            BWindow::MessageReceived(message);
    439879            break;
    440880    }
    MainWindow::_UpdateMenus(BDiskDevice* disk, 
    6421082        fWipeMenuItem->SetEnabled(false);
    6431083        fEjectMenuItem->SetEnabled(false);
    6441084        fSurfaceTestMenuItem->SetEnabled(false);
     1085        fUnRegisterMenuItem->SetEnabled(false);
     1086        fSaveMenuItem->SetEnabled(false);
     1087        fWriteMenuItem->SetEnabled(false);
    6451088    } else {
    6461089//      fWipeMenuItem->SetEnabled(true);
    6471090        fWipeMenuItem->SetEnabled(false);
    MainWindow::_UpdateMenus(BDiskDevice* disk, 
    6491092//      fSurfaceTestMenuItem->SetEnabled(true);
    6501093        fSurfaceTestMenuItem->SetEnabled(false);
    6511094
     1095        if (disk->IsFile()) fUnRegisterMenuItem->SetEnabled(true);
     1096        else fUnRegisterMenuItem->SetEnabled(false);
     1097       
     1098        fSaveMenuItem->SetEnabled(true);
     1099        if (disk->IsReadOnly()) fWriteMenuItem->SetEnabled(false);
     1100        else fWriteMenuItem->SetEnabled(true);
     1101
    6521102        // Create menu and items
    6531103        BPartition* parentPartition = NULL;
    6541104        if (selectedPartition <= -2) {
  • src/apps/drivesetup/MainWindow.h

    diff --git a/src/apps/drivesetup/MainWindow.h b/src/apps/drivesetup/MainWindow.h
    index 6166d82..e48f02a 100644
    a b  
    1111
    1212
    1313#include <DiskDeviceRoster.h>
     14#include <FilePanel.h>
    1415#include <PopUpMenu.h>
     16#include <StringView.h>
    1517#include <Window.h>
    1618
    1719#include "Support.h"
    public: 
    4850            status_t            RestoreSettings(BMessage* archive);
    4951            void                ApplyDefaultSettings();
    5052
     53            status_t            register_file_disk_device(const char* fileName);
     54            status_t            unregister_file_disk_device(const char* fileName);
     55    static  int32               SaveDiskImage(void* data);
     56    static  int32               WriteDiskImage(void* data);
     57
    5158private:
    5259            void                _ScanDrives();
    5360
    private: 
    97104
    98105            BMenu*              fPartitionMenu;
    99106            BMenu*              fFormatMenu;
     107            BMenu*              fDiskImageMenu;
    100108
    101109            BMenuBar*           fMenuBar;
    102110
    private: 
    119127            BMenuItem*          fMountContextMenuItem;
    120128            BMenuItem*          fUnmountContextMenuItem;
    121129            BPopUpMenu*         fContextMenu;
     130
     131            BMenuItem*          fRegisterMenuItem;
     132            BMenuItem*          fUnRegisterMenuItem;
     133            BMenuItem*          fSaveMenuItem;
     134            BMenuItem*          fWriteMenuItem;
     135
     136            BFilePanel*         fFileOpen;
    122137};
    123138
    124139
  • src/apps/drivesetup/PartitionList.cpp

    diff --git a/src/apps/drivesetup/PartitionList.cpp b/src/apps/drivesetup/PartitionList.cpp
    index 1fd2946..0ad6f1a 100644
    a b  
    1212
    1313#include "PartitionList.h"
    1414
     15#include <stdio.h>
    1516#include <Catalog.h>
    1617#include <ColumnTypes.h>
     18#include <DiskDevice.h>
     19#include <File.h>
     20#include <IconUtils.h>
    1721#include <Locale.h>
    1822#include <Path.h>
     23#include <Volume.h>
     24#include <VolumeRoster.h>
    1925
    2026#include <driver_settings.h>
    2127
    2228#include "Support.h"
    2329#include "MainWindow.h"
     30#include "icons.h"
    2431
    2532
    2633#undef B_TRANSLATION_CONTEXT
    enum { 
    3542    kVolumeNameColumn,
    3643    kMountedAtColumn,
    3744    kSizeColumn,
     45    kFreeSizeColumn,
     46    kBlockSizeColumn,
    3847    kParametersColumn,
    3948    kPartitionTypeColumn,
    4049};
    PartitionListRow::PartitionListRow(BPartition* partition) 
    208217
    209218    // Device icon
    210219
    211     BBitmap* icon = NULL;
    212     if (partition->IsDevice()) {
    213         icon_size size = B_MINI_ICON;
    214         icon = new BBitmap(BRect(0, 0, size - 1, size - 1), B_RGBA32);
    215         if (partition->GetIcon(icon, size) != B_OK) {
    216             delete icon;
    217             icon = NULL;
    218         }
     220    BVolume v;
     221    partition->GetVolume(&v);
     222
     223    BVolume boot;
     224    BVolumeRoster().GetBootVolume(&boot);
     225
     226    bool fBoot;
     227    bool fReadOnly;
     228    bool fShared;
     229    bool fEncrypted;
     230
     231    fBoot = v == boot;
     232    fReadOnly = v.IsReadOnly();
     233    fShared = v.IsShared();
     234
     235    BString parameters;
     236    if (fBoot) {
     237        parameters += B_TRANSLATE("Boot");
     238        parameters += ", ";
    219239    }
    220240
    221     SetField(new BBitmapStringField(icon, path.Path()), kDeviceColumn);
     241    if (partition->Device()->IsFile()) {
     242        parameters += B_TRANSLATE("Virtual");
     243        parameters += ", ";
     244    }
    222245
    223     // File system & volume name
     246    if (fReadOnly) {
     247        parameters += B_TRANSLATE("Readonly");
     248        parameters += ", ";
     249    }
     250    if (v.IsRemovable()) {
     251        parameters += B_TRANSLATE("Removable");
     252        parameters += ", ";
     253    }
     254    if (fShared) {
     255        parameters += B_TRANSLATE("Shared");
     256        parameters += ", ";
     257    }
     258    if (v.KnowsMime()) {
     259        parameters += B_TRANSLATE("Mimes");
     260        parameters += ", ";
     261    }
     262    if (v.KnowsAttr()) {
     263        parameters += B_TRANSLATE("Attributes");
     264        parameters += ", ";
     265    }
     266    if (v.KnowsQuery()) {
     267        parameters += B_TRANSLATE("Queries");
     268        parameters += ", ";
     269    }
     270   
     271    char e[16];
     272    BString enc;
     273    BFile(path.Path(), B_READ_ONLY).ReadAt(0, &e, 11);
     274    enc.Append(e);
     275    if (enc.EndsWith("-FVE-FS-")) {
     276        parameters.Append(B_TRANSLATE("BitLocker encrypted"));
     277        parameters += ", ";
     278        fEncrypted = true;
     279    }
     280    else if (enc.EndsWith("PGPGUARD")) {
     281        parameters.Append(B_TRANSLATE("PGP encrypted"));
     282        parameters += ", ";
     283        fEncrypted = true;
     284    }
     285    else if (enc.EndsWith("SafeBoot")) {
     286        parameters.Append(B_TRANSLATE("SafeBoot encrypted"));
     287        parameters += ", ";
     288        fEncrypted = true;
     289    }
     290    else if (enc.StartsWith("LUKS")) {
     291        parameters.Append(B_TRANSLATE("LUKS encrypted"));
     292        parameters += ", ";
     293        fEncrypted = true;
     294    }
     295    else fEncrypted = false;
     296
     297    BBitmap *fIcon = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32);
     298 
     299    if (fBoot) BIconUtils::GetVectorIcon(kLeaf, sizeof(kLeaf), fIcon);
     300    else if (fEncrypted) BIconUtils::GetVectorIcon(kEncrypted, sizeof(kEncrypted), fIcon);
     301    else if (fReadOnly) BIconUtils::GetVectorIcon(kReadOnly, sizeof(kReadOnly), fIcon);
     302    else if (fShared) BIconUtils::GetVectorIcon(kShared, sizeof(kShared), fIcon);
     303    else if (partition->Device()->IsFile()) BIconUtils::GetVectorIcon(kFile, sizeof(kFile), fIcon);
     304    else if (partition->IsDevice()) {
     305        icon_size size = B_MINI_ICON;
     306        fIcon = new BBitmap(BRect(0, 0, size - 1, size - 1), B_RGBA32);
     307        if (partition->GetIcon(fIcon, size) != B_OK) {
     308            delete fIcon;
     309            fIcon = NULL;
     310        }
     311    }
     312    else fIcon = NULL;
     313 
     314    SetField(new BBitmapStringField(fIcon, path.Path()), kDeviceColumn);
     315 
     316    // File system & volume name
    224317
    225318    BString partitionType(partition->Type());
    226319
    PartitionListRow::PartitionListRow(BPartition* partition) 
    264357        SetField(new BStringField(kUnavailableString), kSizeColumn);
    265358    }
    266359
     360    if (v.FreeBytes() > 0) {
     361        char size[1024];
     362        SetField(new BStringField(string_for_size(v.FreeBytes(), size, sizeof(size))), kFreeSizeColumn);
     363    }
     364    else SetField(new BStringField(kUnavailableString), kFreeSizeColumn);
     365
     366    char bs;
     367    sprintf(&bs, "%" B_PRIu32, partition->BlockSize());
     368    SetField(new BStringField(const_cast<const char*>(&bs)), kBlockSizeColumn);
     369
    267370    // Additional parameters
    268371
    269372    if (partition->Parameters() != NULL) {
    270         BString parameters;
    271 
    272373        // check parameters
    273374        void* handle = parse_driver_settings_string(partition->Parameters());
    274375        if (handle != NULL) {
    PartitionListRow::PartitionListRow(BPartition* partition) 
    278379
    279380            delete_driver_settings(handle);
    280381        }
    281 
    282         SetField(new BStringField(parameters), kParametersColumn);
    283     } else {
    284         SetField(new BStringField(kUnavailableString), kParametersColumn);
    285382    }
    286383
     384    if (parameters.EndsWith(", ")) parameters.RemoveLast(", ");
     385    SetField(new BStringField(parameters), kParametersColumn);
     386
    287387    // Partition type
    288388
    289389    if (partitionType.IsEmpty())
    PartitionListRow::PartitionListRow(partition_id parentID, partition_id id, 
    304404    // TODO: design icon for spaces on partitions
    305405    SetField(new BBitmapStringField(NULL, "-"), kDeviceColumn);
    306406
    307     SetField(new BStringField(B_TRANSLATE("<empty>")), kFilesystemColumn);
     407    SetField(new BStringField(B_TRANSLATE("<empty or unknown>")), kFilesystemColumn);
    308408    SetField(new BStringField(kUnavailableString), kVolumeNameColumn);
    309409
    310410    SetField(new BStringField(kUnavailableString), kMountedAtColumn);
    PartitionListView::PartitionListView(const BRect& frame, uint32 resizeMode) 
    344444        B_TRUNCATE_MIDDLE), kMountedAtColumn);
    345445    AddColumn(new PartitionColumn(B_TRANSLATE("Size"), 100, 50, 500,
    346446        B_TRUNCATE_END, B_ALIGN_RIGHT), kSizeColumn);
     447    AddColumn(new PartitionColumn(B_TRANSLATE("Free space"), 100, 50, 500,
     448        B_TRUNCATE_END, B_ALIGN_RIGHT), kFreeSizeColumn);
     449    AddColumn(new PartitionColumn(B_TRANSLATE("Block size"), 100, 50, 500,
     450        B_TRUNCATE_END, B_ALIGN_RIGHT), kBlockSizeColumn);
    347451    AddColumn(new PartitionColumn(B_TRANSLATE("Parameters"), 100, 50, 500,
    348452        B_TRUNCATE_END), kParametersColumn);
    349453    AddColumn(new PartitionColumn(B_TRANSLATE("Partition type"), 200, 50, 500,
  • new file src/apps/drivesetup/icons.h

    diff --git a/src/apps/drivesetup/icons.h b/src/apps/drivesetup/icons.h
    new file mode 100644
    index 0000000..40fc94c
    - +  
     1const unsigned char kLeaf[] = {
     2    0x6e, 0x63, 0x69, 0x66, 0x02, 0x05, 0x00, 0x02, 0x01, 0x06, 0x02, 0x38,
     3    0xcc, 0x87, 0xbd, 0x08, 0x3d, 0x3d, 0xcc, 0x62, 0x39, 0x81, 0x95, 0x46,
     4    0x09, 0x92, 0x4a, 0x99, 0x6b, 0x00, 0xff, 0xb1, 0x1b, 0xff, 0xff, 0xf9,
     5    0xc7, 0x01, 0x06, 0x0d, 0xee, 0x1f, 0xbf, 0x03, 0x2f, 0x44, 0x2b, 0x4f,
     6    0x2b, 0x48, 0x29, 0x4b, 0x24, 0x4a, 0x29, 0x53, 0x23, 0x50, 0x29, 0x53,
     7    0x23, 0x54, 0x29, 0x54, 0x23, 0x54, 0x2e, 0x58, 0x26, 0x5a, 0x2e, 0x58,
     8    0x5c, 0x30, 0x30, 0x58, 0x30, 0x58, 0x38, 0x5a, 0x3b, 0x54, 0x3b, 0x54,
     9    0x35, 0x54, 0x35, 0x53, 0x35, 0x53, 0x3b, 0x50, 0x3a, 0x4a, 0x33, 0x4f,
     10    0x35, 0x4b, 0x33, 0x48, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x1a, 0x41, 0xcc,
     11    0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xcc, 0x0a, 0x43, 0xa6,
     12    0x76, 0xcb, 0x99, 0xb5, 0x15, 0xff, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a,
     13    0x00, 0x01, 0x00, 0x1a, 0x41, 0xcc, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
     14    0x00, 0x41, 0xcc, 0x0a, 0x43, 0xa6, 0x76, 0xcb, 0x99, 0xb5, 0x00, 0x15,
     15    0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x02, 0x41, 0xcc,
     16    0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xcc, 0x0a, 0x43, 0xa6,
     17    0x76, 0xcb, 0x99, 0xb5
     18};
     19
     20const unsigned char kEncrypted[] = {
     21    0x6e, 0x63, 0x69, 0x66, 0x02, 0x05, 0x00, 0x03, 0xff, 0x00, 0x00, 0x03,
     22    0x02, 0x04, 0x31, 0x22, 0xbd, 0x10, 0x22, 0xb6, 0x77, 0x22, 0x22, 0x31,
     23    0x22, 0xb6, 0x77, 0x22, 0xbd, 0x10, 0x31, 0x40, 0xb6, 0x77, 0x40, 0xbd,
     24    0x10, 0x40, 0x40, 0x31, 0x40, 0xbd, 0x10, 0x40, 0xb6, 0x77, 0x02, 0x03,
     25    0x28, 0x37, 0x28, 0x37, 0x25, 0x33, 0xb6, 0xaa, 0xb6, 0xaa, 0xb5, 0x50,
     26    0xb8, 0x07, 0xb8, 0x07, 0xb5, 0x50, 0x37, 0x28, 0xba, 0xe0, 0xb4, 0xe7,
     27    0x38, 0x29, 0x02, 0x03, 0x3a, 0x2b, 0x3a, 0x2b, 0x3e, 0x2f, 0xbc, 0xdd,
     28    0xbc, 0xdd, 0xbe, 0x34, 0xbb, 0x86, 0xbb, 0x84, 0xbe, 0x35, 0x2b, 0x3a,
     29    0x2f, 0x3d, 0x2b, 0x3a, 0x02, 0x0a, 0x00, 0x03, 0x00, 0x01, 0x02, 0x12,
     30    0x41, 0x95, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x95, 0x35,
     31    0x40, 0x17, 0x64, 0x40, 0x17, 0x64, 0x01, 0x17, 0x83, 0x02, 0x04, 0x0a,
     32    0x01, 0x03, 0x00, 0x01, 0x02, 0x02, 0x41, 0x95, 0x35, 0x00, 0x00, 0x00,
     33    0x00, 0x00, 0x00, 0x41, 0x95, 0x35, 0x40, 0x17, 0x64, 0x40, 0x17, 0x64
     34};
     35
     36const unsigned char kReadOnly[] = {
     37    0x6e, 0x63, 0x69, 0x66, 0x0f, 0x05, 0x01, 0x02, 0x00, 0x06, 0x03, 0x38,
     38    0xd2, 0xf7, 0x3c, 0xd1, 0x63, 0xbf, 0x82, 0xb2, 0x3b, 0x84, 0xa9, 0x4b,
     39    0x88, 0x50, 0x49, 0x10, 0xc9, 0x00, 0xff, 0xef, 0xa5, 0xbd, 0xff, 0xfc,
     40    0xc0, 0xff, 0xff, 0xf8, 0x90, 0x02, 0x01, 0x06, 0x02, 0x3e, 0x49, 0x24,
     41    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xaa, 0xaa, 0x49, 0x40, 0x00,
     42    0x4a, 0x80, 0x00, 0xff, 0xff, 0xfc, 0xc0, 0x7c, 0xf1, 0xb7, 0x06, 0x02,
     43    0x00, 0x16, 0x02, 0x3a, 0x55, 0xa6, 0xba, 0xc2, 0x29, 0x3f, 0x0d, 0xa3,
     44    0x3e, 0x95, 0x86, 0x46, 0xc2, 0xeb, 0x47, 0xa1, 0xd6, 0x00, 0x01, 0xff,
     45    0x9e, 0x02, 0x00, 0x06, 0x03, 0xb4, 0xa7, 0xac, 0x38, 0xfc, 0xa2, 0xbb,
     46    0xf7, 0x7b, 0xb7, 0x86, 0xa6, 0x49, 0x3b, 0x6c, 0x47, 0x11, 0x63, 0x00,
     47    0xff, 0xee, 0xd5, 0x8d, 0xdb, 0xab, 0x5f, 0xcf, 0xff, 0xee, 0xd5, 0x02,
     48    0x00, 0x06, 0x02, 0x3d, 0x4d, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     49    0x40, 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xea,
     50    0xba, 0xff, 0xff, 0xf6, 0xe3, 0x02, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00,
     51    0x39, 0x0c, 0x30, 0xbb, 0xcf, 0x3c, 0x00, 0x00, 0x00, 0x4b, 0x60, 0x00,
     52    0x46, 0x00, 0x00, 0x00, 0xff, 0xea, 0xee, 0xc6, 0xd1, 0x7c, 0x8a, 0xff,
     53    0xda, 0x9f, 0xaa, 0x02, 0x00, 0x06, 0x02, 0xaa, 0xb1, 0xfb, 0x3a, 0x08,
     54    0x1f, 0xbe, 0x8a, 0x26, 0xaf, 0x5e, 0x79, 0x4c, 0x50, 0x14, 0x46, 0xc6,
     55    0xa1, 0x00, 0xff, 0xe3, 0xe8, 0xff, 0xf8, 0xa1, 0xb1, 0x02, 0x00, 0x06,
     56    0x02, 0x3c, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
     57    0x00, 0x4a, 0x40, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfb, 0xb5, 0x0d, 0x00,
     58    0xf0, 0xab, 0x06, 0x02, 0x00, 0x06, 0x02, 0xb6, 0x6e, 0x92, 0x3a, 0x77,
     59    0x41, 0xbf, 0xe2, 0x39, 0xbb, 0xd4, 0x8d, 0x4c, 0x06, 0x3f, 0x48, 0xc5,
     60    0xf5, 0x00, 0xa5, 0x2a, 0x04, 0xff, 0xfd, 0xb4, 0x4b, 0x02, 0x00, 0x06,
     61    0x02, 0x3b, 0x8e, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
     62    0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0xb0, 0x3a, 0xff,
     63    0xe9, 0xda, 0x71, 0x03, 0xe2, 0xc2, 0x55, 0x04, 0x00, 0x66, 0x03, 0x80,
     64    0x00, 0x00, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x00,
     65    0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xe0, 0x00,
     66    0x00, 0xff, 0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x0c, 0x06, 0x0c, 0xae,
     67    0xaa, 0xba, 0xb4, 0x0b, 0xc1, 0x4b, 0x33, 0xc5, 0xad, 0xb7, 0x5d, 0xc3,
     68    0x71, 0xbd, 0xef, 0xc8, 0x05, 0xc1, 0x3e, 0xca, 0x02, 0xc4, 0xe0, 0x4f,
     69    0x41, 0xc5, 0x07, 0x37, 0x4b, 0x39, 0x4a, 0x45, 0xc3, 0x3c, 0xc6, 0xd1,
     70    0xc3, 0x6f, 0xca, 0x28, 0xbf, 0x80, 0xc1, 0x18, 0xbb, 0x1e, 0xc5, 0x1b,
     71    0xbd, 0x3e, 0xbf, 0x07, 0xba, 0x06, 0x3a, 0xb8, 0xba, 0x06, 0x09, 0xae,
     72    0xaa, 0x02, 0xb5, 0x7d, 0x43, 0xb9, 0xb9, 0xc5, 0xed, 0xb7, 0xbb, 0x49,
     73    0xbb, 0xb7, 0x56, 0xbd, 0x75, 0xcb, 0x34, 0xc6, 0xf0, 0xc5, 0xc2, 0x4e,
     74    0x4f, 0x51, 0x4b, 0xc9, 0xbb, 0xc4, 0x28, 0xca, 0x8e, 0xc3, 0xaf, 0x40,
     75    0x34, 0x06, 0x06, 0xb2, 0x08, 0x31, 0x24, 0x53, 0x56, 0x29, 0x56, 0x25,
     76    0x56, 0x2d, 0x53, 0x2e, 0x31, 0x26, 0x29, 0x0a, 0x06, 0x31, 0x24, 0xb8,
     77    0xba, 0xb5, 0xb2, 0xb8, 0xba, 0xb7, 0x79, 0x31, 0x2e, 0xb6, 0x77, 0xb6,
     78    0xec, 0xb6, 0x7c, 0xb6, 0x3c, 0x0a, 0x04, 0x33, 0x24, 0xb9, 0x69, 0xb5,
     79    0xba, 0x4a, 0x27, 0x4d, 0x24, 0x08, 0x04, 0xba, 0x28, 0xb4, 0xd3, 0x30,
     80    0x27, 0x30, 0x2b, 0xba, 0x28, 0xb8, 0x58, 0x06, 0x06, 0x2e, 0x0b, 0x53,
     81    0x24, 0x50, 0x29, 0x50, 0x25, 0x50, 0x2d, 0x53, 0x2e, 0x4f, 0x4c, 0x29,
     82    0x4c, 0x2d, 0x4c, 0x25, 0x4f, 0x24, 0x00, 0x03, 0xc4, 0xea, 0xb4, 0xd3,
     83    0xc4, 0xea, 0xb4, 0xd3, 0xc4, 0x92, 0xb5, 0x17, 0x4b, 0x29, 0x4b, 0xb5,
     84    0x9e, 0x4b, 0xb7, 0x8d, 0xc4, 0xea, 0xb8, 0x58, 0xc4, 0x92, 0xb8, 0x14,
     85    0xc4, 0xea, 0xb8, 0x58, 0x06, 0x04, 0xee, 0x53, 0x24, 0x56, 0x29, 0x56,
     86    0x25, 0x56, 0x2d, 0x53, 0x2e, 0x50, 0x29, 0x50, 0x2d, 0x50, 0x25, 0x0a,
     87    0x04, 0xb9, 0x69, 0xb5, 0xba, 0xb9, 0x69, 0xb7, 0x71, 0x4a, 0x2b, 0x4a,
     88    0x27, 0x0a, 0x04, 0xb9, 0x69, 0xb7, 0x71, 0x33, 0x2e, 0x4d, 0x2e, 0x4a,
     89    0x2b, 0x0a, 0x0c, 0x48, 0x2a, 0x40, 0x22, 0x35, 0x2d, 0x2a, 0x22, 0x22,
     90    0x2a, 0x2d, 0x35, 0x22, 0x40, 0x2a, 0x48, 0x35, 0x3d, 0x40, 0x48, 0x48,
     91    0x40, 0x3d, 0x35, 0x0a, 0x0a, 0x00, 0x03, 0x02, 0x05, 0x07, 0x12, 0x40,
     92    0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40, 0x26, 0x8f, 0xc6,
     93    0x03, 0xab, 0x4b, 0x1c, 0x95, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x04,
     94    0x01, 0x03, 0x02, 0x40, 0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83,
     95    0x40, 0x26, 0x8f, 0xc6, 0x03, 0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x05, 0x01,
     96    0x04, 0x02, 0x40, 0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40,
     97    0x26, 0x8f, 0xc6, 0x03, 0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x08, 0x01, 0x09,
     98    0x02, 0x40, 0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40, 0x26,
     99    0x8f, 0xc6, 0x03, 0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x09, 0x01, 0x0a, 0x02,
     100    0x40, 0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40, 0x26, 0x8f,
     101    0xc6, 0x03, 0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x06, 0x01, 0x06, 0x02, 0x40,
     102    0x26, 0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40, 0x26, 0x8f, 0xc6,
     103    0x03, 0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x07, 0x01, 0x08, 0x02, 0x40, 0x26,
     104    0x8f, 0xbf, 0xa4, 0x83, 0x3f, 0xa4, 0x83, 0x40, 0x26, 0x8f, 0xc6, 0x03,
     105    0xab, 0x4b, 0x1c, 0x95, 0x0a, 0x0c, 0x01, 0x0b, 0x30, 0x36, 0x36, 0x01,
     106    0x17, 0x83, 0x22, 0x04, 0x0a, 0x0d, 0x01, 0x0b, 0x30, 0x34, 0x34, 0x01,
     107    0x17, 0x83, 0x22, 0x04, 0x0a, 0x0e, 0x01, 0x0b, 0x20, 0x34, 0x34
     108};
     109
     110const unsigned char kShared[] = {
     111    0x6e, 0x63, 0x69, 0x66, 0x13, 0x04, 0x00, 0x4c, 0x03, 0xff, 0xcb, 0x9a,
     112    0x01, 0xcd, 0x98, 0x66, 0xb2, 0x01, 0xcd, 0x99, 0x66, 0xb2, 0x01, 0xcd,
     113    0x99, 0x66, 0xb2, 0x01, 0xcd, 0x99, 0x66, 0xb2, 0x01, 0xcd, 0x99, 0x66,
     114    0xb2, 0x01, 0xcd, 0x99, 0x66, 0xb2, 0x01, 0xcd, 0x99, 0x66, 0xb2, 0x01,
     115    0xcd, 0x98, 0x66, 0xb2, 0x04, 0xff, 0xf2, 0x04, 0xff, 0xf2, 0x04, 0xff,
     116    0xf2, 0x04, 0xff, 0xf2, 0x05, 0x00, 0x04, 0xff, 0xb2, 0x01, 0xcd, 0x98,
     117    0x66, 0xb2, 0x04, 0x00, 0x2b, 0x05, 0x00, 0x12, 0x06, 0x17, 0xeb, 0xff,
     118    0xbe, 0xff, 0xbe, 0x3f, 0xc5, 0xdd, 0xb9, 0x18, 0xcb, 0xb1, 0xba, 0x52,
     119    0xc4, 0xc9, 0xb8, 0xdc, 0xc4, 0x28, 0xb9, 0x72, 0xc2, 0xdc, 0xba, 0x19,
     120    0xc1, 0xb3, 0xb9, 0xb6, 0xc2, 0x3c, 0xb9, 0xaf, 0xc1, 0xb3, 0xb9, 0xb6,
     121    0xb7, 0xbb, 0xb9, 0xb6, 0xb7, 0xbb, 0xb9, 0xb6, 0xb6, 0x4f, 0xb9, 0xb6,
     122    0xb7, 0x9b, 0xbc, 0x6c, 0xb5, 0xaa, 0xbc, 0x6c, 0xb7, 0x9b, 0xbc, 0x6c,
     123    0xbb, 0x19, 0xbc, 0x6c, 0xbb, 0x19, 0xbc, 0x6c, 0xbb, 0xa1, 0xbc, 0x77,
     124    0xbc, 0x21, 0xbd, 0x12, 0xbc, 0x21, 0xbc, 0x8e, 0xbc, 0x21, 0xbd, 0x12,
     125    0xbb, 0xbf, 0xbe, 0x1b, 0xb3, 0xb8, 0xc5, 0xdf, 0xb3, 0xb8, 0xc5, 0xdf,
     126    0xb2, 0x4b, 0xc7, 0x4d, 0xb5, 0x87, 0xc7, 0xb0, 0xb4, 0x90, 0xc8, 0xa7,
     127    0xb5, 0x87, 0xc7, 0xb0, 0xb5, 0x8d, 0xc7, 0xb1, 0xb5, 0x24, 0xc8, 0x13,
     128    0xb5, 0x24, 0xc8, 0x13, 0xb3, 0xb8, 0xc9, 0x80, 0xb8, 0x41, 0xc9, 0x52,
     129    0xb6, 0x4f, 0xcb, 0x01, 0xb8, 0x41, 0xc9, 0x52, 0xb8, 0x96, 0xc8, 0xfa,
     130    0xb8, 0x96, 0xc8, 0xfa, 0xb7, 0xaf, 0xca, 0x8b, 0xbc, 0x47, 0xc9, 0xcc,
     131    0xba, 0xed, 0xcb, 0x75, 0xbc, 0x47, 0xc9, 0xcc, 0xbc, 0x8f, 0xc9, 0x86,
     132    0xbc, 0x95, 0xc9, 0x88, 0xbc, 0x95, 0xc9, 0x88, 0xba, 0xef, 0xcb, 0x24,
     133    0xbf, 0x80, 0xca, 0x68, 0xbd, 0xb0, 0xcc, 0x58, 0xbf, 0x80, 0xca, 0x68,
     134    0x4d, 0xc5, 0x19, 0xc9, 0x55, 0xc0, 0x4f, 0xc8, 0xd0, 0xc1, 0x37, 0xc9,
     135    0xd9, 0xbf, 0x66, 0xc9, 0x77, 0xbd, 0xda, 0xc9, 0xb8, 0xbf, 0x25, 0xc9,
     136    0x77, 0xbd, 0xda, 0xca, 0x5f, 0xbd, 0x12, 0xca, 0x5f, 0xbd, 0x12, 0xca,
     137    0xa4, 0xbc, 0x2f, 0x06, 0x09, 0xdf, 0xfb, 0x03, 0xc2, 0xd1, 0xba, 0x5d,
     138    0xc2, 0xd1, 0xba, 0x5d, 0xc3, 0x09, 0xba, 0x68, 0xc4, 0x46, 0xbb, 0x84,
     139    0xc4, 0x46, 0xba, 0xf9, 0xc4, 0x46, 0xbb, 0x84, 0xbb, 0xd1, 0xc4, 0x92,
     140    0xbb, 0xc9, 0xc4, 0x92, 0xbb, 0xc9, 0xc6, 0x1a, 0xbb, 0xa0, 0x56, 0xbd,
     141    0x7f, 0x56, 0xbc, 0x25, 0x56, 0xbd, 0x7f, 0xc8, 0x59, 0xbc, 0x67, 0xc8,
     142    0xb7, 0xbc, 0x65, 0xc8, 0xb7, 0xbc, 0x65, 0xc8, 0x12, 0xbb, 0x65, 0xc4,
     143    0x9e, 0xbb, 0x70, 0xc6, 0x28, 0x35, 0xc4, 0x57, 0xba, 0x94, 0xc2, 0xe9,
     144    0xb9, 0xd4, 0xc3, 0x0d, 0xb9, 0xdc, 0xc2, 0xe9, 0xb9, 0xd4, 0x06, 0x08,
     145    0xbe, 0xbf, 0xb7, 0x35, 0xbb, 0xe0, 0xbc, 0x6b, 0xbb, 0x99, 0xbc, 0x6b,
     146    0xbb, 0x99, 0x3a, 0xbd, 0x11, 0xbf, 0xe8, 0xbc, 0xce, 0xbd, 0xe6, 0xbd,
     147    0x78, 0xc1, 0x90, 0xbc, 0x40, 0xc2, 0xb9, 0xbc, 0x21, 0xc0, 0x2c, 0xbd,
     148    0xdf, 0xc1, 0x61, 0xbd, 0x57, 0xbe, 0xf7, 0xbe, 0x68, 0xbb, 0x7b, 0xbe,
     149    0xae, 0xbd, 0x7f, 0xbe, 0x8c, 0xbb, 0x99, 0xbd, 0xbf, 0xbb, 0xe2, 0xbc,
     150    0x88, 0xbc, 0xac, 0xbc, 0xa4, 0xb9, 0x6e, 0xbc, 0x34, 0xb7, 0x9b, 0xbc,
     151    0x6c, 0x06, 0x09, 0xfe, 0xbf, 0x03, 0xbf, 0xc5, 0xc3, 0xc5, 0xc0, 0x4f,
     152    0xc4, 0xb6, 0xc0, 0x93, 0xc4, 0x4f, 0xc0, 0x0b, 0xc5, 0x1d, 0xbe, 0x07,
     153    0xc6, 0xb8, 0xbe, 0x29, 0xc6, 0x2f, 0xbd, 0x39, 0xc7, 0x41, 0xbc, 0x28,
     154    0xc8, 0xdc, 0xbc, 0x6b, 0xc8, 0x53, 0xbb, 0xe2, 0xc9, 0x67, 0xb9, 0xe0,
     155    0xc9, 0xab, 0xba, 0x6a, 0xc9, 0xab, 0xb9, 0x57, 0xc9, 0xab, 0xb9, 0xbd,
     156    0xca, 0x9b, 0xb9, 0x34, 0xca, 0x9b, 0xba, 0x46, 0xca, 0x9b, 0xbc, 0x47,
     157    0xc9, 0xcc, 0xbb, 0x9b, 0xca, 0x76, 0xbc, 0x47, 0xc9, 0xcc, 0xc0, 0xfa,
     158    0xc5, 0x1d, 0xc2, 0x0c, 0xc4, 0xb6, 0xc1, 0xa5, 0xc4, 0x70, 0xc1, 0x61,
     159    0xc4, 0x70, 0x06, 0x09, 0xfe, 0xbf, 0x03, 0xbb, 0xc1, 0xc2, 0xf7, 0xbc,
     160    0x4a, 0xc3, 0xe8, 0xbc, 0x8f, 0xc3, 0x81, 0xbc, 0x05, 0xc4, 0x4f, 0xba,
     161    0x03, 0xc5, 0xeb, 0xba, 0x24, 0xc5, 0x61, 0xb9, 0x34, 0xc6, 0x73, 0xb8,
     162    0x22, 0xc8, 0x0e, 0xb8, 0x67, 0xc7, 0x85, 0xb7, 0xdd, 0xc8, 0x99, 0xb5,
     163    0xda, 0xc8, 0xdc, 0xb6, 0x64, 0xc8, 0xdc, 0xb5, 0x51, 0xc8, 0xdc, 0xb5,
     164    0xb9, 0xc9, 0xcd, 0xb5, 0x3a, 0xc9, 0x97, 0xb6, 0x85, 0xca, 0x26, 0xb8,
     165    0x42, 0xc8, 0xfe, 0xb7, 0x95, 0xc9, 0xa7, 0xb8, 0x42, 0xc8, 0xfe, 0x39,
     166    0xc4, 0x4f, 0xbe, 0x07, 0xc3, 0xe8, 0xbd, 0xa0, 0xc3, 0xa2, 0x3a, 0xc3,
     167    0xa2, 0x06, 0x09, 0xfe, 0xbf, 0x03, 0xba, 0x03, 0xc0, 0xf4, 0xba, 0x8c,
     168    0xc1, 0xe5, 0xba, 0xd1, 0xc1, 0x7d, 0xba, 0x47, 0xc2, 0x4c, 0xb8, 0x45,
     169    0xc3, 0xe8, 0xb8, 0x67, 0xc3, 0x5e, 0xb7, 0x76, 0xc4, 0x70, 0xb6, 0x64,
     170    0xc6, 0x0c, 0xb6, 0xa9, 0xc5, 0x84, 0xb6, 0x20, 0xc6, 0x96, 0xb4, 0x1d,
     171    0xc6, 0xda, 0xb5, 0x17, 0xc7, 0x53, 0xb3, 0xa1, 0xc6, 0x9f, 0xb3, 0xfa,
     172    0xc7, 0xcb, 0xb3, 0x71, 0xc7, 0xcb, 0xb4, 0x83, 0xc7, 0xcb, 0xb6, 0x84,
     173    0xc6, 0xfc, 0xb5, 0xd6, 0xc7, 0xa5, 0xb6, 0x84, 0xc6, 0xfc, 0xbb, 0x37,
     174    0xc2, 0x4c, 0xbc, 0x4a, 0xc1, 0xe5, 0xbb, 0xe2, 0xc1, 0xa1, 0xbb, 0x9e,
     175    0xc1, 0xa1, 0x02, 0x05, 0xbc, 0xb1, 0xbf, 0x15, 0xbc, 0xb1, 0xbf, 0x15,
     176    0xbd, 0xa0, 0xbf, 0x36, 0xc0, 0x2c, 0xc0, 0x6c, 0xbf, 0xa4, 0xc0, 0x05,
     177    0xc0, 0xb6, 0xc0, 0xd3, 0xc3, 0x20, 0xc1, 0xa1, 0xc2, 0xda, 0xc0, 0xd3,
     178    0xc2, 0x52, 0xc1, 0x17, 0xc0, 0x72, 0xc1, 0x17, 0xc1, 0x66, 0xc1, 0x72,
     179    0xbf, 0x5e, 0xc0, 0xb0, 0xbd, 0xe6, 0x41, 0xbe, 0x6f, 0xc0, 0x6c, 0x3a,
     180    0xbf, 0xe2, 0x02, 0x02, 0xbd, 0x7f, 0xbe, 0x8c, 0xbe, 0xf7, 0xbf, 0x7c,
     181    0xbe, 0xb4, 0xbe, 0x8c, 0xc3, 0x20, 0xbd, 0x9b, 0xc2, 0x52, 0xbe, 0x46,
     182    0xc1, 0xeb, 0xbe, 0xcf, 0x02, 0x03, 0xc0, 0x2c, 0xc1, 0xc2, 0xc0, 0x93,
     183    0xc1, 0xe5, 0xc1, 0x61, 0xc2, 0x08, 0xc2, 0xb9, 0xc2, 0x29, 0xc2, 0x52,
     184    0xc1, 0xe5, 0xc3, 0x20, 0xc2, 0x6f, 0xc3, 0x41, 0xc3, 0x1a, 0xc3, 0x41,
     185    0xc3, 0x1a, 0xc2, 0x73, 0xc2, 0xb3, 0x06, 0x08, 0xff, 0xaa, 0xb3, 0xfd,
     186    0xc6, 0xa8, 0xb3, 0xc5, 0xc6, 0x54, 0xb4, 0x6c, 0xc6, 0x70, 0xb5, 0x83,
     187    0xc5, 0x43, 0xb5, 0x4a, 0xc5, 0xb3, 0xb5, 0xba, 0xc4, 0xd4, 0xb6, 0x7e,
     188    0xc4, 0x2b, 0xb5, 0xf3, 0xc4, 0x80, 0xb7, 0x09, 0xc3, 0xd8, 0xb8, 0xad,
     189    0xc2, 0x51, 0xb8, 0x75, 0xc2, 0xc0, 0xb8, 0xe5, 0xc1, 0xe1, 0xb9, 0xa9,
     190    0xc1, 0x1e, 0xba, 0x4e, 0xc0, 0xcc, 0xbb, 0x0e, 0xbf, 0x19, 0xb4, 0x18,
     191    0xc5, 0xb4, 0x06, 0x08, 0xff, 0xaa, 0xb5, 0xb3, 0xc8, 0xa0, 0xb5, 0x7a,
     192    0xc8, 0x4d, 0xb6, 0x22, 0xc8, 0x69, 0xb7, 0x37, 0xc7, 0x3a, 0xb7, 0x00,
     193    0xc7, 0xaa, 0xb7, 0x6f, 0xc6, 0xcc, 0xb8, 0x34, 0xc6, 0x23, 0xb7, 0xa8,
     194    0xc6, 0x77, 0xb8, 0xc0, 0xc5, 0xd0, 0xba, 0x62, 0xc4, 0x49, 0xba, 0x2b,
     195    0xc4, 0xb9, 0xba, 0x9b, 0xc3, 0xd8, 0x35, 0xc3, 0x14, 0xbc, 0x5b, 0xc2,
     196    0xe6, 0xbb, 0x95, 0xc2, 0x1a, 0xb5, 0xcd, 0xc7, 0xaa, 0x06, 0x08, 0xff,
     197    0xe8, 0xb9, 0x19, 0xc9, 0x94, 0xb8, 0x9e, 0xc9, 0x22, 0xb9, 0x89, 0xc9,
     198    0x5b, 0xba, 0x9f, 0xc8, 0x2f, 0xba, 0x68, 0xc8, 0x9d, 0xba, 0xd6, 0xc7,
     199    0xbe, 0xbb, 0x9b, 0xc7, 0x17, 0xbb, 0x0f, 0xc7, 0x6b, 0xbc, 0x03, 0xc6,
     200    0xd7, 0xbd, 0x6e, 0xc5, 0xa9, 0xbc, 0xe9, 0xc6, 0x2b, 0xbd, 0x9b, 0xc5,
     201    0x7f, 0xbd, 0x29, 0xbb, 0x93, 0xc6, 0xdb, 0xbb, 0x05, 0xc6, 0xd7, 0xb9,
     202    0x33, 0xc8, 0x9e, 0xb9, 0x33, 0xc8, 0x9e, 0xb9, 0x33, 0xc8, 0x9d, 0x06,
     203    0x06, 0xff, 0x0e, 0xbc, 0xce, 0xca, 0x7b, 0xbb, 0xdb, 0xca, 0x48, 0xbd,
     204    0x3e, 0xca, 0x43, 0xbe, 0x53, 0xc9, 0x15, 0xbe, 0x1b, 0xc9, 0x84, 0xbe,
     205    0x8c, 0xc8, 0xa5, 0xbf, 0x4e, 0xc7, 0xfe, 0xbe, 0xc3, 0xc8, 0x51, 0xbf,
     206    0xab, 0xc7, 0xc6, 0xc0, 0xf1, 0xc6, 0xbe, 0xc0, 0x6b, 0xc7, 0x38, 0xc1,
     207    0x35, 0xc6, 0x81, 0xbf, 0xe0, 0xc6, 0x9f, 0xbc, 0xe8, 0xc9, 0x84, 0xbc,
     208    0xe8, 0xc9, 0x84, 0xbc, 0xe9, 0xc9, 0x84, 0x02, 0x1e, 0xca, 0xe4, 0xbb,
     209    0xfe, 0xca, 0xe4, 0xbc, 0x5f, 0xca, 0xe4, 0xbb, 0xb6, 0xca, 0xa6, 0xbb,
     210    0x1a, 0xca, 0xd3, 0xbb, 0x6a, 0xca, 0x19, 0xba, 0x20, 0xc5, 0xec, 0xb8,
     211    0xd4, 0xc8, 0x8c, 0xb9, 0x62, 0xc4, 0xd1, 0xb8, 0x99, 0xc4, 0x04, 0xb9,
     212    0x39, 0xc4, 0x24, 0xb9, 0x1c, 0xc3, 0xfa, 0xb9, 0x3e, 0xc2, 0xdf, 0xb9,
     213    0xca, 0xc3, 0x14, 0xb9, 0xb0, 0xc2, 0xa3, 0xb9, 0xaa, 0xc1, 0xaf, 0xb9,
     214    0x70, 0xc2, 0x25, 0xb9, 0x6c, 0xc1, 0xaf, 0xb9, 0x70, 0xb7, 0xbb, 0xb9,
     215    0x70, 0xb7, 0xbb, 0xb9, 0x70, 0xb6, 0xc9, 0xb9, 0x70, 0xb6, 0x1f, 0xbb,
     216    0x4c, 0xb6, 0x1f, 0xba, 0x6b, 0xb6, 0x1f, 0xbb, 0xae, 0xb6, 0x7b, 0xbc,
     217    0x44, 0xb6, 0x3e, 0xbc, 0x04, 0xb6, 0xa9, 0xbc, 0x76, 0xb7, 0x9b, 0xbc,
     218    0xb2, 0xb7, 0x01, 0xbc, 0xb2, 0xb7, 0x9b, 0xbc, 0xb2, 0xbb, 0x19, 0xbc,
     219    0xb2, 0xbb, 0x19, 0xbc, 0xb2, 0xbb, 0xb5, 0xbc, 0xbe, 0xbb, 0xdc, 0xbd,
     220    0x0b, 0xbb, 0xd8, 0xbc, 0xda, 0xbb, 0xd1, 0xbd, 0x26, 0xbb, 0x84, 0xbd,
     221    0xf5, 0xbb, 0x8d, 0xbd, 0xdc, 0xbb, 0x6d, 0xbe, 0x0b, 0xb3, 0x89, 0xc5,
     222    0xaf, 0xb3, 0x89, 0xc5, 0xaf, 0xb3, 0x25, 0xc6, 0x11, 0x20, 0xc6, 0xcf,
     223    0x20, 0xc6, 0x75, 0x20, 0xc7, 0x30, 0xb3, 0x68, 0xc7, 0xbf, 0xb3, 0x2c,
     224    0xc7, 0x85, 0xb3, 0xb8, 0xc8, 0x10, 0xb4, 0xa8, 0xc8, 0x46, 0x23, 0xc8,
     225    0x42, 0xb4, 0x5e, 0xc8, 0xc6, 0xb4, 0xce, 0xc9, 0xbb, 0xb4, 0x69, 0x58,
     226    0xb5, 0x7d, 0xca, 0x78, 0x2d, 0xc9, 0xb5, 0xb6, 0xf5, 0xca, 0x98, 0xb8,
     227    0x32, 0xc9, 0xc1, 0xb8, 0x38, 0xc9, 0xd9, 0xb8, 0x34, 0xc9, 0xcf, 0xb8,
     228    0x65, 0xca, 0x5e, 0xb9, 0xb6, 0xca, 0xe6, 0xb8, 0xf3, 0xca, 0xc2, 0xba,
     229    0x4f, 0xcb, 0x01, 0xbb, 0xd0, 0xca, 0x8a, 0xbb, 0x1f, 0xca, 0xf2, 0xbb,
     230    0xd0, 0xca, 0x9f, 0xbb, 0xd9, 0xca, 0xc2, 0xbb, 0xd4, 0xca, 0xb3, 0xbb,
     231    0xf5, 0xcb, 0x2c, 0xbc, 0xd8, 0xcb, 0x9c, 0xbc, 0x52, 0xcb, 0x7b, 0xbd,
     232    0x8e, 0xcb, 0xca, 0xbf, 0xb2, 0xca, 0x97, 0xbe, 0xb9, 0xcb, 0x9f, 0xbf,
     233    0xb0, 0xca, 0x99, 0xc5, 0x1f, 0xc5, 0x4a, 0xc5, 0x1f, 0xc5, 0x4a, 0xc5,
     234    0x48, 0xc5, 0x21, 0xc9, 0x91, 0xc0, 0x71, 0xc9, 0x09, 0xc1, 0x5e, 0xc9,
     235    0xda, 0xbf, 0xf1, 0xc9, 0xf4, 0xbf, 0x38, 0xc9, 0xf4, 0xbf, 0x99, 0xc9,
     236    0xf4, 0xbe, 0xeb, 0xc9, 0xcc, 0xbe, 0x25, 0xc9, 0xe4, 0xbe, 0x98, 0xc9,
     237    0xcc, 0xbe, 0x25, 0xca, 0x9a, 0xbd, 0x3a, 0xca, 0x9a, 0xbd, 0x3a, 0xca,
     238    0x9a, 0xbd, 0x3a, 0x06, 0x35, 0xfb, 0xff, 0xbf, 0xfa, 0xbf, 0xaf, 0xfe,
     239    0xbf, 0xea, 0xef, 0xff, 0xbf, 0xfe, 0x03, 0xca, 0x2d, 0xbc, 0xcf, 0xca,
     240    0x41, 0xbc, 0x91, 0xca, 0x2d, 0xbc, 0xcf, 0xc9, 0x2c, 0xbd, 0xc0, 0xc9,
     241    0x46, 0xbe, 0x41, 0xc9, 0x46, 0xbe, 0x41, 0xc9, 0x5d, 0xbe, 0xb2, 0xc9,
     242    0x6c, 0xbf, 0x39, 0xc9, 0x6c, 0xbe, 0xfb, 0xc9, 0x6c, 0xbf, 0x88, 0xc9,
     243    0x1a, 0xc0, 0x2c, 0xc9, 0x54, 0xbf, 0xc5, 0xc8, 0xb1, 0xc0, 0xe4, 0xc4,
     244    0xbe, 0xc4, 0xe9, 0xc5, 0xd1, 0xc3, 0xd5, 0xc4, 0xbe, 0xc4, 0xe9, 0xbf,
     245    0x4f, 0xca, 0x36, 0xbf, 0x4f, 0xca, 0x36, 0xbe, 0x7e, 0xcb, 0x17, 0xbc,
     246    0xf9, 0xcb, 0x18, 0xbd, 0x8b, 0xcb, 0x3b, 0xbc, 0xa6, 0xcb, 0x02, 0xbc,
     247    0x5d, 0xca, 0x9d, 0xbc, 0x6b, 0xca, 0xd5, 0xbc, 0x4b, 0xca, 0x5e, 0xbc,
     248    0xc5, 0xc9, 0xb9, 0xbc, 0x71, 0xca, 0x0c, 0xbc, 0xc5, 0xc9, 0xb9, 0xbc,
     249    0xc1, 0xc9, 0xb5, 0xbc, 0xc1, 0xc9, 0xb5, 0xbd, 0xce, 0xc8, 0xb0, 0xc1,
     250    0xa6, 0xc4, 0xef, 0xc0, 0xa8, 0xc4, 0xc0, 0xc0, 0xdd, 0xc4, 0xf4, 0xbc,
     251    0x18, 0xc9, 0x9b, 0xbc, 0x18, 0xc9, 0x9b, 0xbb, 0x77, 0xca, 0x5f, 0xb9,
     252    0xcf, 0xca, 0x5f, 0xba, 0x79, 0xca, 0x7e, 0xb9, 0x41, 0xca, 0x45, 0xb8,
     253    0xba, 0xc9, 0xae, 0xb8, 0xd5, 0xca, 0x00, 0xb8, 0xb5, 0xc9, 0x9f, 0xb8,
     254    0xb3, 0xc9, 0x82, 0xb8, 0xb3, 0xc9, 0x91, 0xb8, 0xb3, 0xc9, 0x61, 0xb8,
     255    0xce, 0xc9, 0x22, 0xb8, 0xbf, 0xc9, 0x40, 0xb9, 0x18, 0xc8, 0xd4, 0xb9,
     256    0x70, 0xc8, 0x78, 0xb9, 0x6c, 0xc8, 0x71, 0xb9, 0x6c, 0xc8, 0x71, 0xba,
     257    0x5c, 0xc7, 0x87, 0xbd, 0x6a, 0xc4, 0x8f, 0xbc, 0xcc, 0xc5, 0x2a, 0xbd,
     258    0x82, 0xc4, 0x78, 0xbe, 0x01, 0xc4, 0x3f, 0xbc, 0xf5, 0xc3, 0xcd, 0xbd,
     259    0x0a, 0xc4, 0x2f, 0xb8, 0xa8, 0xc8, 0x70, 0xb8, 0xa8, 0xc8, 0x70, 0xb8,
     260    0x8b, 0xc8, 0x91, 0xb8, 0x62, 0xc8, 0xcd, 0xb8, 0x74, 0xc8, 0xaf, 0xb8,
     261    0x62, 0xc8, 0xcd, 0xb8, 0x0f, 0xc9, 0x23, 0xb8, 0x0f, 0xc9, 0x23, 0xb6,
     262    0xf9, 0xca, 0x16, 0xb5, 0x33, 0xc9, 0x5f, 0xb5, 0xac, 0xc9, 0xe1, 0xb5,
     263    0x11, 0xc9, 0x3a, 0xb5, 0x01, 0x57, 0xb5, 0x01, 0xc9, 0x13, 0xb5, 0x01,
     264    0xc8, 0xb5, 0xb5, 0x56, 0xc8, 0x43, 0xb5, 0x1d, 0xc8, 0x7c, 0xb5, 0x56,
     265    0xc8, 0x43, 0xbb, 0x89, 0xc2, 0x71, 0xbb, 0x01, 0xc1, 0xb3, 0xba, 0xdb,
     266    0xc2, 0x72, 0xb5, 0x5b, 0xc7, 0x84, 0xb5, 0x57, 0xc7, 0x80, 0xb5, 0x57,
     267    0xc7, 0x80, 0xb4, 0xee, 0xc7, 0xe8, 0xb3, 0xc8, 0xc7, 0x60, 0xb4, 0x2e,
     268    0xc7, 0xc5, 0xb3, 0x69, 0xc6, 0xff, 0xb3, 0xe8, 0xc6, 0x10, 0xb3, 0x75,
     269    0xc6, 0x85, 0xb3, 0xe8, 0xc6, 0x10, 0xbb, 0xf9, 0xbe, 0x42, 0xbc, 0x67,
     270    0xbd, 0x12, 0xbc, 0x67, 0xbd, 0x12, 0xbc, 0x67, 0xbc, 0x42, 0xbb, 0x1e,
     271    0xbc, 0x29, 0xbb, 0x88, 0xbc, 0x31, 0xbb, 0x1e, 0xbc, 0x29, 0xb7, 0x9b,
     272    0xbc, 0x29, 0xb7, 0x9b, 0xbc, 0x29, 0xb7, 0x47, 0xbc, 0x29, 0xb6, 0xde,
     273    0xbb, 0xe7, 0xb7, 0x08, 0xbc, 0x12, 0xb6, 0xb1, 0xbb, 0xb7, 0xb6, 0xa9,
     274    0xbb, 0x4c, 0xb6, 0xa9, 0xbb, 0x77, 0xb6, 0xa9, 0xba, 0xab, 0xb7, 0xbb,
     275    0xb9, 0xf9, 0xb7, 0x1d, 0xb9, 0xf9, 0xb7, 0xbb, 0xb9, 0xf9, 0xc1, 0xb3,
     276    0xb9, 0xf9, 0xc1, 0xb3, 0xb9, 0xf9, 0xc2, 0x13, 0xb9, 0xf6, 0xc2, 0xb8,
     277    0xba, 0x52, 0xc2, 0x8f, 0xba, 0x38, 0xc2, 0xb8, 0xba, 0x52, 0xc2, 0xd8,
     278    0xba, 0x68, 0xc4, 0x50, 0xb9, 0xac, 0xc4, 0x56, 0xb9, 0xa5, 0xc4, 0x56,
     279    0xb9, 0xa5, 0xc4, 0x5c, 0xb9, 0xa0, 0xc5, 0xd0, 0xb9, 0x5a, 0xc4, 0xe4,
     280    0xb9, 0x28, 0xc8, 0x3e, 0xb9, 0xde, 0xca, 0x30, 0x35, 0xc9, 0xb7, 0xba,
     281    0x8c, 0xca, 0x4f, 0xbb, 0x94, 0xca, 0x59, 0xbb, 0xfe, 0xca, 0x59, 0xbb,
     282    0xcb, 0xca, 0x59, 0xbc, 0x4b, 0x02, 0x07, 0xc3, 0x13, 0xbd, 0x34, 0xc3,
     283    0xb9, 0xbc, 0x51, 0xc3, 0x8b, 0xbc, 0xca, 0xc4, 0x6e, 0xbb, 0xf7, 0xc3,
     284    0xba, 0xbc, 0x15, 0xc5, 0x22, 0xbb, 0xd9, 0xc7, 0xe7, 0xbc, 0x7f, 0xc7,
     285    0x14, 0xbb, 0xab, 0xc7, 0x40, 0xbc, 0x7f, 0xc5, 0xf5, 0xbd, 0xd9, 0xc6,
     286    0x05, 0xbd, 0x51, 0xc5, 0xe7, 0xbe, 0x60, 0xc5, 0x5e, 0xbe, 0x16, 0xc5,
     287    0x9b, 0xbe, 0x42, 0xc5, 0x22, 0xbd, 0xe8, 0xc4, 0xf5, 0xbd, 0x16, 0xc4,
     288    0xf5, 0xbd, 0x60, 0xc4, 0xf5, 0xbc, 0xca, 0xc5, 0xc9, 0xbc, 0x51, 0xc5,
     289    0x5e, 0xbc, 0x60, 0xc4, 0xb9, 0xbc, 0x6f, 0x06, 0x0b, 0xff, 0xee, 0x3f,
     290    0xc9, 0x77, 0xbd, 0xda, 0xc9, 0x77, 0xbd, 0xda, 0xca, 0x5f, 0xbd, 0x12,
     291    0xc9, 0x4a, 0xba, 0x63, 0xcb, 0x6e, 0xbb, 0x32, 0xc9, 0xb1, 0xbb, 0x32,
     292    0xc8, 0x59, 0xbc, 0x67, 0xc8, 0xe3, 0xbc, 0x67, 0xc8, 0x59, 0xbc, 0xf0,
     293    0xc7, 0x6a, 0xc0, 0x05, 0xc8, 0xe3, 0xbe, 0x46, 0xc7, 0x1a, 0xc0, 0x63,
     294    0xc3, 0x2a, 0xc4, 0x32, 0xc1, 0xba, 0xc6, 0xb8, 0xc1, 0xba, 0xc6, 0xb8,
     295    0xc0, 0xde, 0xc7, 0xa1, 0xbf, 0xe9, 0xc8, 0x99, 0xbd, 0xa0, 0xca, 0x9b,
     296    0xbe, 0x2a, 0xca, 0x9b, 0xbd, 0x18, 0xca, 0x9b, 0xbd, 0x18, 0xcb, 0x47,
     297    0xbc, 0x6c, 0xcb, 0x47, 0xbd, 0xc3, 0xcb, 0x47, 0xc1, 0x3f, 0xc8, 0x99,
     298    0xbe, 0xf7, 0xca, 0xe0, 0xc3, 0x87, 0xc6, 0x51, 0xc9, 0xb1, 0xbf, 0x36,
     299    0xc9, 0x8e, 0xc0, 0xd3, 0xc9, 0xd2, 0xbd, 0x9b, 0x02, 0x1c, 0xca, 0xd7,
     300    0xbd, 0xfc, 0xca, 0xec, 0xbd, 0xbd, 0xca, 0xd7, 0xbd, 0xfc, 0xca, 0x53,
     301    0xbe, 0xe5, 0xca, 0x53, 0xbe, 0xe5, 0xca, 0x53, 0xbe, 0xe5, 0xca, 0x24,
     302    0xbf, 0x73, 0xca, 0x24, 0xbf, 0x73, 0xca, 0x3b, 0xbf, 0xe3, 0xca, 0x18,
     303    0xc0, 0x64, 0xca, 0x18, 0x41, 0xca, 0x18, 0xc0, 0xb3, 0xc9, 0xc5, 0x44,
     304    0xca, 0x00, 0x43, 0xc9, 0x5b, 0xc2, 0x10, 0xc5, 0x6a, 0xc6, 0x15, 0xc6,
     305    0x7c, 0xc5, 0x02, 0xc5, 0x6a, 0xc6, 0x15, 0xbf, 0xfa, 0xcb, 0x62, 0xbf,
     306    0xfa, 0xcb, 0x62, 0xbf, 0x28, 0xcc, 0x43, 0xbd, 0xa5, 0xcc, 0x43, 0xbe,
     307    0x35, 0xcc, 0x67, 0xbd, 0x51, 0xcc, 0x2f, 0xbd, 0x07, 0xcb, 0xca, 0xbd,
     308    0x17, 0xcc, 0x01, 0x39, 0xcb, 0x89, 0xbc, 0xc3, 0xca, 0xc7, 0xbc, 0x6d,
     309    0xcb, 0x1a, 0xbc, 0x22, 0xcb, 0x8a, 0xba, 0x79, 0xcb, 0x8a, 0xbb, 0x25,
     310    0xcb, 0xaa, 0xb9, 0xec, 0xcb, 0x70, 0xb8, 0xc4, 0x5b, 0xb8, 0xdf, 0xca,
     311    0xd3, 0xb8, 0xbf, 0xca, 0x73, 0xb8, 0xba, 0xca, 0x4f, 0xb8, 0xba, 0xca,
     312    0x4f, 0xb7, 0xa3, 0xcb, 0x40, 0xb5, 0xdd, 0xca, 0x89, 0xb6, 0x56, 0xcb,
     313    0x0c, 0xb5, 0xbc, 0xca, 0x66, 0xb5, 0x2a, 0xc9, 0xe9, 0xb5, 0x2a, 0xca,
     314    0x13, 0xb5, 0x2a, 0xc9, 0xb4, 0xb6, 0x03, 0xc8, 0xab, 0xb6, 0x03, 0xc8,
     315    0xab, 0xb5, 0x9a, 0xc9, 0x14, 0xbc, 0xa5, 0xbf, 0x6e, 0xbc, 0xa5, 0xbf,
     316    0x6e, 0xbc, 0xa5, 0xbf, 0x6e, 0xbd, 0x11, 0xbe, 0x3f, 0xbd, 0x11, 0xbe,
     317    0x3f, 0xbd, 0x11, 0xbd, 0x6d, 0xbb, 0xc8, 0xbd, 0x54, 0xbc, 0x34, 0x3a,
     318    0xbb, 0xc8, 0xbd, 0x54, 0xb8, 0x13, 0xbe, 0x34, 0xb8, 0x13, 0xbe, 0x34,
     319    0xb7, 0xbf, 0xbe, 0x34, 0xb7, 0x56, 0xbd, 0xf2, 0xb7, 0x80, 0xbe, 0x1d,
     320    0xb7, 0x29, 0x3b, 0xb7, 0x21, 0xbd, 0x57, 0xb7, 0x21, 0xbd, 0x82, 0xb7,
     321    0x21, 0xbc, 0xb6, 0xb8, 0x34, 0xbc, 0x04, 0xb7, 0x95, 0xbc, 0x04, 0xb8,
     322    0x34, 0xbc, 0x04, 0xc4, 0xfb, 0xba, 0xd7, 0xc4, 0xfb, 0xba, 0xd7, 0xc4,
     323    0xfb, 0xba, 0xd7, 0xc5, 0x02, 0xba, 0xd1, 0xc5, 0x02, 0xba, 0xd1, 0xc5,
     324    0x07, 0xba, 0xcc, 0xc6, 0x7b, 0xba, 0x86, 0xc5, 0x8e, 0xba, 0x54, 0x57,
     325    0xbb, 0x09, 0xca, 0xda, 0xbc, 0x8a, 0xca, 0x63, 0xbb, 0xb7, 0xca, 0xfa,
     326    0xbc, 0xc1, 0xcb, 0x04, 0xbd, 0x29, 0xcb, 0x04, 0x39, 0xcb, 0x04, 0xbd,
     327    0x75, 0x11, 0x0a, 0x00, 0x01, 0x11, 0x00, 0x0a, 0x01, 0x01, 0x00, 0x00,
     328    0x0a, 0x02, 0x01, 0x01, 0x00, 0x0a, 0x03, 0x01, 0x02, 0x00, 0x0a, 0x04,
     329    0x01, 0x03, 0x00, 0x0a, 0x05, 0x01, 0x04, 0x00, 0x0a, 0x06, 0x01, 0x05,
     330    0x00, 0x0a, 0x07, 0x01, 0x06, 0x00, 0x0a, 0x08, 0x01, 0x07, 0x00, 0x0a,
     331    0x09, 0x01, 0x08, 0x00, 0x0a, 0x0a, 0x01, 0x09, 0x00, 0x0a, 0x0b, 0x01,
     332    0x0a, 0x00, 0x0a, 0x0c, 0x01, 0x0b, 0x00, 0x0a, 0x0d, 0x01, 0x0c, 0x00,
     333    0x0a, 0x0e, 0x02, 0x0d, 0x0e, 0x00, 0x0a, 0x0f, 0x01, 0x0f, 0x00, 0x0a,
     334    0x10, 0x01, 0x10, 0x00
     335};
     336
     337const unsigned char kFile[] = {
     338    0x6e, 0x63, 0x69, 0x66, 0x04, 0x02, 0x00, 0x06, 0x03, 0x39, 0x9e, 0x0f,
     339    0x3d, 0x9c, 0x0a, 0xbf, 0x82, 0xb2, 0x3b, 0x84, 0xa9, 0x4b, 0x88, 0x50,
     340    0x48, 0x70, 0xc9, 0x00, 0xa5, 0xb1, 0xff, 0xbc, 0xea, 0xf1, 0xff, 0xff,
     341    0xb3, 0xb8, 0xff, 0x05, 0x01, 0x02, 0x01, 0x06, 0x02, 0x3e, 0x49, 0x24,
     342    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xaa, 0xaa, 0x49, 0x40, 0x00,
     343    0x4a, 0x30, 0x00, 0xff, 0xc0, 0xd5, 0xff, 0x7c, 0x89, 0x6e, 0xff, 0x04,
     344    0x01, 0x92, 0x04, 0x06, 0x06, 0xae, 0x0b, 0xb4, 0x0b, 0xbf, 0x4d, 0x33,
     345    0xc3, 0xaf, 0xb7, 0x5d, 0xc1, 0x73, 0xbd, 0xef, 0xc6, 0x07, 0xc1, 0x3e,
     346    0xc8, 0x04, 0xca, 0x28, 0xbd, 0x82, 0xc1, 0x18, 0xb9, 0x20, 0xc5, 0x1b,
     347    0xbb, 0x40, 0xbf, 0x07, 0xb8, 0x08, 0x3a, 0xb6, 0xbc, 0x06, 0x05, 0xae,
     348    0x02, 0xb5, 0x7d, 0x3e, 0xb9, 0xb9, 0xc3, 0xef, 0xb7, 0xbb, 0x44, 0xbb,
     349    0xb7, 0x51, 0xbd, 0x75, 0xc9, 0x36, 0xca, 0x8e, 0xc1, 0xb1, 0x40, 0x2f,
     350    0x0a, 0x09, 0x3b, 0x59, 0x3d, 0x5b, 0xbf, 0xcd, 0xc9, 0x3e, 0x45, 0x5b,
     351    0xc5, 0x16, 0xc5, 0xf1, 0x60, 0x46, 0x5b, 0x43, 0x5d, 0x45, 0x44, 0x51,
     352    0x0a, 0x04, 0x5a, 0x42, 0x5e, 0x3f, 0x5a, 0x3d, 0x57, 0x40, 0x05, 0x0a,
     353    0x03, 0x02, 0x02, 0x03, 0x00, 0x0a, 0x01, 0x01, 0x01, 0x10, 0x01, 0x17,
     354    0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x01, 0x00, 0x0a, 0x01, 0x01, 0x00,
     355    0x10, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00, 0x00
     356};