簡體   English   中英

如何為離子源代碼提供安全性

[英]how to provide safety to ionic source code

嗨,這一直是我的問題,擔心離子應用是否安全? 是否有可能破解離子應用程序並獲取內部代碼或類似的東西,例如如果我的代碼是這樣的(向我的應用程序添加服務)

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Injectable({
  providedIn: 'root'
})
export class EncryptionService {

  url = 'https://api.amnas....com';
   api-key='......'

  constructor(private http: HttpClient) { }

    newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
    return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}&cost=${encodeURI(cost)}&toname=${encodeURI(toname)}&tocode=${encodeURI(tocode)}&passcode=${encodeURI(passcode)}&date=${encodeURI(date)}&checkfor=${encodeURI(checkfor)}&back=${encodeURI(back)}`);
}


}

任何人都可以破解我的導出應用程序(apk)並提取 api-key 嗎?

無論您如何構建應用程序,客戶端都可以訪問任何安全密鑰、令牌等。 您不能依賴構建中的任何內容保持秘密。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM