這篇文章主要介紹angular中jsencrypt插件怎么用,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
成都創(chuàng)新互聯(lián)公司專注于乾安網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供乾安營銷型網(wǎng)站建設(shè),乾安網(wǎng)站制作、乾安網(wǎng)頁設(shè)計、乾安網(wǎng)站官網(wǎng)定制、成都微信小程序服務(wù),打造乾安網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供乾安網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
angular使用jsencrypt插件
1.首先在angular項目里邊安裝jsencrypt模塊
npm install --save jsencrypt
2.引入使用
import * as JsEncryptModule from 'jsencrypt'; export class RsaUtil { constructor() { } public getSignStr(timestr: string) { let publicKey = '-----BEGIN PUBLIC KEY-----公鑰-----END PUBLIC KEY-----'; let privateStr = "自定義的加密串"; let encrypt = new JsEncryptModule.JSEncrypt(); console.log(encrypt); encrypt.setPublicKey(publicKey); let signature = encrypt.encrypt(privateStr + timestr); console.log(signature); return signature; } }
以上是“angular中jsencrypt插件怎么用”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
本文名稱:angular中jsencrypt插件怎么用
網(wǎng)頁網(wǎng)址:http://www.rwnh.cn/article18/pdhidp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、靜態(tài)網(wǎng)站、定制網(wǎng)站、網(wǎng)頁設(shè)計公司、品牌網(wǎng)站制作、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)