GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - darkerk/Encryption: AES加密文件

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
NSData-AES.h
NSData-AES.h
 
 
NSData-AES.m
NSData-AES.m
 
 
NSFileManager-AES.h
NSFileManager-AES.h
 
 
NSFileManager-AES.m
NSFileManager-AES.m
 
 
README.md
README.md
 
 
rijndael.c
rijndael.c
 
 
rijndael.h
rijndael.h
 
 

Repository files navigation

// 加密文件事例

NSString *docDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *toPath = [docDir stringByAppendingPathComponent:@"database.db"];

NSFileManager *fileManager = [NSFileManager defaultManager];
if (![fileManager fileExistsAtPath:toPath]) {
    NSString *inPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"database.db"];

    NSError  *error = nil;
    if (![[NSFileManager defaultManager] AESEncryptFile:inPath toFile:toPath usingPassphrase:@"password" error:&error])
    {
        NSLog(@"加密文件失败:%@", [[error userInfo] objectForKey:AESEncryptionErrorDescriptionKey]);
    }

/************** if (![[NSFileManager defaultManager] AESDecryptFile:inPath toFile:toPath usingPassphrase:@"password" error:&error]) { NSLog(@"解密文件失败:%@", [[error userInfo] objectForKey:AESEncryptionErrorDescriptionKey]); } ***************/ }

About

AES加密文件

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.