7 encryption typescript angular
在 Angular 中,如何加密一个值并将其存储在本地存储中,然后检索和解密它。
例子
a: Number = 5;
b: Number = 6;
c: Number;
c= a+b;
localStorage.setItem('result', (this.c)); // I wan to encrypt and store it in local storge here
localStorage.getItem('result'); // I want to decrypt and get the value
Run Code Online (Sandbox Code Playgroud)
哪个是最好的方法以及如何?
| 归档时间: |
|
| 查看次数: |
24242 次 |
| 最近记录: |