kalmar sirri kare ppt

Yadda ake kare kalmar wucewa ta PowerPoint ta amfani da NET REST API.

A cikin duniyar da ke da haɗin kai sosai, PowerPoint ana amfani da gabatarwa sosai don musayar bayanai, isar da saƙo mai tasiri, da gabatar da ra’ayoyi. Koyaya, ana iya samun wasu lokuttan da kuke buƙatar taƙaita damar yin amfani da fayilolin PowerPoint don kiyaye sirri da hana amfani mara izini. Don haka, ta hanyar kalmar sirri da ke kare gabatarwar PowerPoint, za ku iya tabbatar da cewa masu izini kawai za su iya buɗewa da duba abun ciki. A cikin wannan labarin, za mu bincika cikakkun bayanai kan yadda kalmar sirri ke kare gabatarwar PowerPoint ta amfani da .NET REST API, yana ba ku damar kiyaye gabatarwar ku.

API ɗin NET REST zuwa Amintaccen PPT

Aspose.Slides Cloud SDK for .NET yana ba da ƙaƙƙarfan tsarin fasali da damar aiki tare da gabatarwar PowerPoint. Lokacin da ya zo ga kalmar sirri da ke kare fayilolin PowerPoint, SDK yana ba da haɗin kai maras kyau da kuma hanyoyin sauƙin amfani don cim ma wannan aikin da tsari. Bugu da ƙari, cikakkun takaddun bayanai da babban tallafin API suna ba ku damar haɗa ayyukan kariyar kalmar sirri a cikin aikace-aikacenku. Hakanan yana ba ku damar sarrafa aikin kuma yana ba da ingantaccen bayani don kariyar fayil ɗin PowerPoint.

Yanzu, don amfani da SDK, da fatan za a bincika ‘Aspose.Slides-Cloud’ a cikin manajan fakitin NuGet kuma danna maɓallin ‘Ƙara Kunshin’. Bugu da ƙari, ƙirƙiri asusu akan cloud dashboard kuma sami keɓaɓɓen shaidar abokin ciniki.

Kuna iya la’akari da ziyartar farawa da sauri don duk cikakkun bayanai kan yadda ake ƙirƙirar asusu akan dashboard ɗin girgije.

Kalmar wucewa Kare PowerPoint ta amfani da C# .NET

Da fatan za a yi amfani da snippet na lamba mai zuwa don ɓoye fayil ɗin PPT.

// Don ƙarin misalai, da fatan za a ziyarci https://github.com/aspose-slides-cloud
// Samu bayanan abokin ciniki daga https://dashboard.aspose.cloud/
string clientSecret = "7f098199230fc5f2175d494d48f2077c";
string clientID = "ee170169-ca49-49a4-87b7-0e2ff815ea6e";

// ƙirƙirar misali na SlidesApi
SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);

ProtectionProperties dtoProperties = new ProtectionProperties
{
    IsEncrypted = true,
    IsWriteProtected  = true,
    WritePassword = "write",
    ReadPassword  = "read"
};

// kira API don ɓoye gabatarwar PowerPoint
slidesApi.SetProtection("Prismatic design.pptx", dtoProperties); 

Lokacin da ka buɗe sakamakon PowerPoint, za a nuna alamar shigar da kalmar wucewa. Don haka da farko kuna buƙatar shigar da kalmar sirri ta karanta PowerPoint sannan a kan maganganu na gaba, shigar da kalmar wucewa don kunna PowerPoint tace.

An ba da cikakkun bayanai game da snippet code na sama.

SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);

Ƙirƙiri wani abu na ajin SlidesApi inda muka wuce bayanan abokin ciniki azaman muhawara.

ProtectionProperties dtoProperties = new ProtectionProperties
{
    IsEncrypted = true,
    IsWriteProtected  = true,
    WritePassword = "write",
    ReadPassword  = "read"
};

Yin amfani da abu na Kariya, mun ƙididdige idan takardar tana da kariya daga gyare-gyare da kuma kalmomin shiga da ake buƙata don gyara da duba takaddun.

slidesApi.SetProtection("Prismatic design.pptx", dtoProperties);

Kira API don ɓoye gabatarwar PowerPoint. Bayan aiki mai nasara, ana adana PPTX da aka sabunta akan ma’ajiyar girgije iri ɗaya.

Za a iya sauke samfurin PowerPoint da aka yi amfani da shi a cikin misalin da ke sama daga Personalizable bookmarks.pptx.

Yadda ake ɓoye PowerPoint ta amfani da Umarnin CURL

Ta hanyar amfani da ikon umarnin cURL, zaku iya yin kiran API zuwa Aspose.Slides Cloud API kuma kuyi ayyuka daban-daban, gami da ƙara kariyar kalmar sirri zuwa fayilolin PowerPoint ɗinku. Da fatan za a sani cewa dokokin cURL suna ba da hanya mai sauƙi da dacewa don yin hulɗa tare da Aspose.Slides Cloud API, yana ba ku damar haɗa kariyar kalmar sirri ba tare da matsala ba cikin aikace-aikacenku ko rubutunku. Don haka, wannan tsarin yana ba da ingantaccen ingantaccen bayani don kalmar sirri ta kare fayilolin PowerPoint.

Mataki na farko na wannan hanyar shine samar da alamar shiga JWT. Don haka, da fatan za a aiwatar da umarni mai zuwa:

curl -v "https://api.aspose.cloud/connect/token" \
 -X POST \
 -d "grant_type=client_credentials&client_id=bb959721-5780-4be6-be35-ff5c3a6aa4a2&client_secret=4d84d5f6584160cbd91dba1fe145db14" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Yanzu, aiwatar da umarni mai zuwa don ɓoye gabatarwar PowerPoint.

curl -v "https://api.aspose.cloud/v3.0/slides/{sourcePPTX}/protection" \
-X PUT \
-H  "accept: multipart/form-data" \
-H  "authorization: Bearer {accessToken}" \
-H  "Content-Type: application/json" \
-d "{ \"IsEncrypted\": true, \"IsWriteProtected\": true,\"ReadPassword\": \"read\",  \"WritePassword\": \"write\"}"

Sauya ‘sourcePPTX’ tare da sunan shigarwar PowerPoint da aka riga an samu a ma’ajiyar girgije, da ‘accessToken’ tare da alamar samun damar JWT da aka samar a sama.

Kammalawa

A ƙarshe, ƙara kariyar kalmar sirri zuwa gabatarwar PowerPoint yana da mahimmanci don kiyaye tsaro da sirrin bayanai. Ko kuna raba mahimman bayanai tare da abokan ciniki, abokan aiki, ko gabatarwa a cikin saitin jama’a, kariyar kalmar sirri tana tabbatar da cewa masu izini kawai za su iya samun damar abun cikin ku. Tare da ikon Aspose.Slides Cloud da saukaka umarnin cURL, kuna da kayan aikin don aiwatar da kariyar kalmar sirri cikin sauƙi a cikin fayilolin PowerPoint.

Fara kiyaye fayilolin PowerPoint ɗinku a yau kuma ku ji daɗin kwanciyar hankali da ke zuwa tare da sanin an kare abun cikin ku.

Hanyoyin haɗi masu amfani

Labarai masu alaka

Muna ba da shawarar ziyartar shafukan yanar gizo masu zuwa: