Files
SideStore/AltStoreCore/Model/SecureValueTransformer.swift
Riley Testut f1a39e1a1f [AltStoreCore] Refactors core AltStore logic into AltStoreCore framework
AltStoreCore will contain all shared AltStore code between AltStore and any app extensions. Initially, it includes all AltStore model logic.
2020-09-03 16:39:08 -07:00

27 lines
739 B
Swift

//
// SecureValueTransformer.swift
// AltStore
//
// Created by Riley Testut on 8/18/20.
// Copyright © 2020 Riley Testut. All rights reserved.
//
import Foundation
@objc(ALTSecureValueTransformer)
public final class SecureValueTransformer: NSSecureUnarchiveFromDataTransformer
{
public static let name = NSValueTransformerName(rawValue: "ALTSecureValueTransformer")
public override static var allowedTopLevelClasses: [AnyClass] {
let allowedClasses = super.allowedTopLevelClasses + [NSError.self]
return allowedClasses
}
public static func register()
{
let transformer = SecureValueTransformer()
ValueTransformer.setValueTransformer(transformer, forName: name)
}
}