             }
         }
         
-        open static func decryptPEM(_ pemKey: String, passphrase: String) throws -> String {
+        public static func decryptPEM(_ pemKey: String, passphrase: String) throws -> String {
             do {
                 let derKey = try PEM.EncryptedPrivateKey.toDER(pemKey, passphrase: passphrase)
                 return PEM.PrivateKey.toPEM(derKey)

    
    open class PublicKey {
        
        open static func pemToPKCS1DER(_ pemKey: String) throws -> Data {
            guard let derKey = try? PEM.PublicKey.toDER(pemKey) else {
                throw SwError(.invalidKey)
            }

                                            Parameter.dataSize.rawValue, nil, data.count)
            guard status == noErr else { throw CCError(status) }
            
            status = CCCryptorAddParameter!(cryptor!, Parameter.macSize.rawValue, nil, tagLength)
            guard status == noErr else { throw CCError(status) }
            
            status = iv.withUnsafeBytes { ivBytes in
                return CCCryptorAddParameter!(cryptor!, Parameter.iv.rawValue, ivBytes, iv.count)
            }
            guard status == noErr else { throw CCError(status) }
            
            status = aData.withUnsafeBytes { aDataBytes in
                return CCCryptorAddParameter!(cryptor!, Parameter.authData.rawValue, aDataBytes, aData.count)
            }
            guard status == noErr else { throw CCError(status) }
            
            var result = Data(count: data.count)
            let rescount = result.count
            var updateLen: size_t = 0
            status = withUnsafePointers(data, &result, { dataBytes, resultBytes in
                return CCCryptorUpdate!(
                    cryptor!, dataBytes, data.count,
                    resultBytes, rescount,
                    &updateLen)
            })
            guard status == noErr else { throw CCError(status) }
            
            var finalLen: size_t = 0
            status = result.withUnsafeMutableBytes { resultBytes in
                return CCCryptorFinal!(cryptor!, resultBytes + updateLen,
                                       rescount - updateLen,
                                       &finalLen)
            }
            guard status == noErr else { throw CCError(status) }
            
            result.count = updateLen + finalLen
            
            var tagLength_ = tagLength
            var tag = Data(count: tagLength)
            status = tag.withUnsafeMutableBytes { tagBytes in
                return CCCryptorGetParameter!(cryptor!, Parameter.authTag.rawValue,
                                              tagBytes, &tagLength_)
            }
            guard status == noErr else { throw CCError(status) }
            
            tag.count = tagLength_
