English -> En-README.md
Appleの、keychain Searviseの日本語訳です
そこまで英語上手いわけではないので、間違い等ありましたらPRお願いします。喜びます。
本家URL -> Keychain Servise Programming Guide
ドキュメントの構成について
このドキュメントは、上記記事の構成通りに翻訳して行きます。
English -> En-README.md
そこまで英語上手いわけではないので、間違い等ありましたらPRお願いします。喜びます。
本家URL -> Keychain Servise Programming Guide
このドキュメントは、上記記事の構成通りに翻訳して行きます。
is it "型推論" or something like that?
In [keychain-Service-Concepts/Accessing-a-keychain.md]
Google says "検索でkeychainパラメータにNULLを渡すと、デフォルトのキーチェーン検索リスト内の項目を検索するようにシステムに指示されます。"
But I'm not sure it's correct or not.
デフォルトキーチェーンは、関数呼び出しの際に他のキーチェーンが指定されない限り、新しくできたキーチェーン項目を格納するために使われます。特定の他のキーチェーンサービス機能も、他のキーチェーンが指定されていない時デフォルトキーチェーンを使用します。
ユーザーはキーチェーンアクセスユーティリティを用いて、他のキーチェーンをデフォルトキーチェーンに指定することができます。但し、ログインキーチェーンは変わりません。
iOSでは、より簡単です。アプリケーションからアクセスできるキーチェーン(論理的に異なるiCloudキーチェーンを含む)が一つあるだけです。このキーチェーンはユーザーが端末をアンロックした時に自動的にアンロックされ、端末がロックされたときにロックされます。
アプリケーションは、それの所有するキーチェーン項目とアプリの所属するグループで共有されている項目にのみアクセスできます。
キーチェーンの構造はかなりの力と柔軟性を提供する一方で、ある程度の複雑さをもたらします。幸運なことに、キーチェーンサービスAPIはアプリが文字通り必要とする共通のキーチェーン処理を扱う高レベル関数をいくつか提供します。
macOSでは、パスワード項目を作成してキーチェーンに追加する際、インターネットパスワードかそれ以外の種類のパスワードかによって二つの関数のうちどちらかを呼ぶ必要があります: SecKeychainAddInternetPassword
かSecKeychainAddGenericPassword
です。
例として、インターネットパスワードではない一般的なパスワードを追加するには、以下のようにします。
NSString* service = @"myService";
NSString* account = @"username";
NSString* password = @"somethingSecret";
const void* passwordData = [[password dataUsingEncoding:NSUTF8StringEncoding] bytes];
OSStatus status = SecKeychainAddGenericPassword(
NULL, // Use default keychain
(UInt32)service.length,
[service UTF8String],
(UInt32)account.length,
[account UTF8String],
(UInt32)password.length,
passwordData,
NULL // Uninterested in item reference
);
if (status != errSecSuccess) { // Always check the status
NSLog(@"Write failed: %@", SecCopyErrorMessageString(status, NULL));
}
keychain reference
にNULL
を渡した場合、その項目はデフォルトキーチェーンに追加されます。又、システムは最後の引数を使って新しく作成された項目への任意参照(?)を返します。もし項目への参照が必要ない場合は、上記の例にもあるようにNULL
を引数として渡してください。
add
関数はアクセスオブジェクトを作成し、初期状態で信用されている唯一のアプリケーションとして呼び出し元のアプリケーションをリスト化します。
I think it's not needed when we say it in Japanese
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.