google drive加密/解密文件的網頁版小工具

 

drive-cipher-toolkit

https://github.com/kirinchen/drive-cipher-toolkit

A web-based toolkit to document of google drive encryption & decrypt

最近開發了一個基於網頁的小工具,用於google drive加密/解密文件

專案開發/設定

  • 步驟 1:安裝 Node.js 和 npm
    React 需要 Node.js 環境來運行,所以首先需要安裝 Node.js。你可以從官方網站(https://nodejs.org)下載並安裝 Node.js。

安裝完 Node.js 之後,你也會同時獲得 npm(Node Package Manager)。npm 是一個用於安裝和管理 JavaScript 套件的工具,我們將在後續步驟中使用到它。

REACT_APP_GAPI_API_KEY={Google API Key} REACT_APP_GAPI_OAUTH_CLIENT_ID={Google Auth Client ID} REACT_APP_VERSION=0.1.0

Google API Key & Google Auth Client ID 請參考 瞭解驗證相關資訊和授權

設定OAuth 同意畫面>範圍請設定以下權限

'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.metadata.readonly', 'https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis.com/auth/drive.metadata', 'https://www.googleapis.com/auth/drive.photos.readonly'
  • 步驟 5: 下指令 npm start

這將啟動一個本地開發服務器,並在瀏覽器中打開你的 React 項目。

How To Use

  • 點擊 -> 
  • Google 登入
  • 輸入一個你google drive的檔案名稱(須完整)
  • 加密你的文件

A 輸入加密密碼
B 點擊上傳覆蓋

  • 此時已經加密完成
  • 要解密時下次下方輸入密碼就可以解密了
tags: 手做小專案

留言

這個網誌中的熱門文章

angular 如何Http 如何設定 CORS (Cross-Origin Resource Sharing)

Google Map 單車路徑計算坡度和角度小工具

Google URL Shortener API 快速教學