CryptoPassphrase  Diff

Differences From Artifact [c4660e76b1]:

To Artifact [6bede05795]:


75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
97

98
99
100
101
102
103
104







-








-








-







    func hasSite(_ name: OFString) -> Bool {
        return (storage[name] != nil)
    }

    func length(forSite name: OFString) -> size_t {
        guard let site = storage[name] else {
            OFInvalidArgumentException().throw()
            abort()
        }

        return (site[SiteStorage.lengthField] as! OFNumber).sizeValue
    }

    func isLegacy(site name: OFString) -> Bool {
        guard let site = storage[name] else {
            OFInvalidArgumentException().throw()
            abort()
        }

        return (site[SiteStorage.legacyField] as! OFNumber).boolValue
    }

    func keyFile(forSite name: OFString) -> OFString? {
        guard let site = storage[name] else {
            OFInvalidArgumentException().throw()
            abort()
        }

        let keyFile = site[SiteStorage.keyFileField]
        if keyFile is OFNull {
            return nil
        }