Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1001559 // Delete computer's standard key pair

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (791L/6K/18K).

!747

m {
  !include #1001548 // PKI
  
  p {
    if (!PKI.getStandardPrivateKeyPath().exists() && !PKI.getStandardPublicKeyPath().exists()) {
      print("No standard key pair.");
      ret;
    }
    
    print("Are you sure to delete the key pair? Type DELETE KEYS.");
    if (!match3("delete keys", readLine()))
      return;
      
    PKI.getStandardPrivateKeyPath().delete();
    PKI.getStandardPublicKeyPath().delete();
    
    print("Done!");
 }
}

Author comment

Began life as a copy of #1001558

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001559
Snippet name: Delete computer's standard key pair
Eternal ID of this version: #1001559/1
Text MD5: f84a7240a99ccea4fb7b4351e34d5e5a
Transpilation MD5: 4d01e6e9f683cb213241dd6c5889aa32
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-24 18:59:03
Source code size: 477 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 590 / 620
Referenced in: [show references]