@safe string
mimeType
(string
filename);
ファイル名からMIMEタイプの取得 / Get MIME type from filename
immutable(ubyte)[]
createCommonKey
(RandomGen = Random)(size_t
keySize, RandomGen
rng);
immutable(ubyte)[]
createCommonKey
(size_t
keySize = 16);
共通鍵生成 / Generation of AES common key
immutable(ubyte)[]
createRandomIV
(RandomGen = Random)(RandomGen
rng);
immutable(ubyte)[]
createRandomIV
();
初期ベクトル / Generation of AES IV
参考:
通常は自動で作成して暗号データ内に埋め込むため、使用しません。
以下のような用途を想定しています。
- IVを秘匿したい(暗号データ毎に個別にIVを生成が推奨)
- IVを共通化したい(セキュリティ上非推奨)
- ファイルサイズを(16バイトだけ)減らしたい
immutable(ubyte)[]
createPrivateKey
();
秘密鍵作成(DER形式) / Generation of Ed25519 private key (DER format)
immutable(ubyte)[]
createPublicKey
(in ubyte[]
prvKey);
公開鍵作成(DER形式) / Generation of Ed25519 public key (DER format)
string
convertPrivateKeyToPEM
(in ubyte[]
prvKey);
immutable(ubyte)[]
convertPrivateKeyToDER
(string
prvKey);
immutable(ubyte)[]
convertPrivateKeyToRaw
(in ubyte[]
prvKey);
immutable(ubyte)[]
convertPrivateKeyToDER
(immutable(ubyte)[]
prvKey);
string
convertPublicKeyToPEM
(in ubyte[]
pubKey);
immutable(ubyte)[]
convertPublicKeyToDER
(string
pubKey);
immutable(ubyte)[]
convertPublicKeyToRaw
(immutable(ubyte)[]
pubKey);
immutable(ubyte)[]
convertPublicKeyToDER
(immutable(ubyte)[]
pubKey);
鍵形式変換 / Convertion of Ed25519 public key format
ArkImg
loadImage
(immutable(ubyte)[]
binary, string
mimeType = "image/png", in ubyte[]
commonKey, in ubyte[]
iv = null);
ArkImg
loadImage
(string
filename, in ubyte[]
commonKey = null, in ubyte[]
iv = null);
画像のロード / Load any image to ArkImg
immutable(ubyte)[]
saveImage
(ArkImg
img, string
mimeType = "image/png", in ubyte[]
commonKey, in ubyte[]
iv = null);
画像の保存 / Save ArkImg to image file
メタデータのヘルパ構造体 / Metadata
helper
-
-
ref inout(JSONValue)
value
() inout;
-
-
-
-
immutable(ubyte)[]
sign
() const;
-
SysTime
modified
() const;
-
string comment
() const;
-
bool
verify
(in ubyte[]
data, in ubyte[]
pubKey) const;
-
JSONValue extra
() const;
-
-
ref inout(JSONValue)
value
() inout;
-
-
Item
opIndex
(size_t
idx);
-
-