Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 /...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Takahiro Ikeuchi
August 11, 2021
Programming
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 / Flutter Plugin Argon2 algorithm
Flutter Tokyo Meetup #16 の LT 資料です!
Takahiro Ikeuchi
August 11, 2021
Transcript
22 slides
© 2021 iktakahiro Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 2021.08.11 - Takahiro
Ikeuchi Flutter Tokyo Meetup #16
© 2021 iktakahiro 池内 孝啓(いけうち たかひろ) 株式会社Hakali 取締役CTO • @iktakahiro
• https://github.com/iktakahiro Flutter 歴2.5年, Go, TypeScript, Python
© 2021 iktakahiro おしながき 1. Argon 2 とは 2. fargon2
の概要 3. MethodChannel を活かしたパッケージづくりにまつわる Tips 4. 課題と困っていること ※ 本日のスライドはLT後にシェアいたします
© 2021 iktakahiro 20時間くらい前に公開しました! https://pub.dev/packages/fargon2 ※ LT駆動開発
© 2021 iktakahiro 動機 1. AES のための鍵導出関数が欲しかった(リサーチ目的) 2. 既存パッケージが欲しいものと違った 3.
MethodChannel を使ったプラグイン開発をしてみたかった
© 2021 iktakahiro Argon2 とは? • あるごん・つー • 鍵導出(Key Derivation)関数の1つ
• 2015年に開催された Password Hash Competition にて優勝 • パスワードハッシュの生成や、AES で用いる key の生成に利用できる • https://github.com/P-H-C/phc-winner-argon2 ※ Argon2 そのものの解説ではないので、詳細は割愛!
© 2021 iktakahiro 今回つくったもの : fargon2 とは? • ふぁるごん・つー •
Argon2 のハッシュ生成関数を Flutter アプリ上で気軽に扱えるように したもの • 以下の2つのライブラリの Wrapper ◦ Swift 実装 : CatCrypto ◦ Kotlin 実装 : argon2kt • Platform Specific なコードを実行するために MethodChannel を利用
© 2021 iktakahiro MethodChannel とは? • Writing custom platform-specific code
• Flutter, Dart コードをつうじて iOS / Android ネイティブなコードや機能を 呼び出す仕組み ※ 概要については解説が多いので本日は割愛!
© 2021 iktakahiro MethodChannel を利用したプラグインを実装する流れ 1. プラグイン用に Flutter プロジェクトを作成 2.
Dart のコードを書く 3. Android 用のコードを書く(今回は Kotlin) 4. iOS 用のコードを書く(今回は Swift) 5. 公開!
© 2021 iktakahiro 1. プラグイン用に Flutter プロジェクトを作成 template オプションを plugin
に指定すること これで大体雛形ができる
© 2021 iktakahiro 2. Dart のコードを書く ※ コードは一部抜粋です
© 2021 iktakahiro 3-1. Android 用 Kotlin のコードを書く
© 2021 iktakahiro 3-2. Android 向けに依存関係を解決 build.gradle にパッケージ情報を追加
© 2021 iktakahiro 4-1. iOS 用 Swift のコードを書く
© 2021 iktakahiro 4-2. iOS 向けに依存関係を解決 .podspec にパッケージ情報を追加
© 2021 iktakahiro 簡単!! と思いきや 1. example ディレクトリのコードを iOS 向けにビルドするには
example/ios/Podfile の編集が必要 2. テストが難しい(後述)
© 2021 iktakahiro 5. 公開! • dart pub publish !!
• コードコメントや example の 有無などで PUB POINTS が変動
© 2021 iktakahiro How to use fargon2
© 2021 iktakahiro 課題と困っていること • テストが書けない ◦ そんな馬鹿なと思ったけど、書けない ◦ setMockMethodCallHandler()
のコレジャナイ感 • Xcode のプロジェクトファイルがないので、Xcode で書けない ◦ そんな馬鹿なと思ったけど、書けない 解決策求む!!
© 2021 iktakahiro 告知タイム
https://www.awarefy.app ありのままの自分を理解し、 ストレスと上手に付き合う
We’re Hiring!! • UI デザイナ(採用強化中!) • Web デザイナ • アプリ開発エンジニア
• カスタマーサクセス https://hakali.co.jp/contact @iktakahiro
More Decks by Takahiro Ikeuchi
See All by Takahiro Ikeuchi
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
6.8k
Better Authという選択──AI時代に認証基盤のコードを持つ意味とは / better-auth-ai-era
iktakahiro
0
190
TanStack Start エコシステムの現在地 / TanStack Start Ecosystem 2026
iktakahiro
1
670
TanStack Start 技術選定の裏側 / Findy-Lunch-LT-TanStack-Start
iktakahiro
5
3.2k
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
3
2k
最新のAIツールは何を解決しようとしているのか - Python エンジニアが取り組むべき "越境" とは - / Python-Engineer-in-AI-Era
iktakahiro
1
1.7k
AWS Step Functions と Amazon Bedrock で構築する 可用性の高いAIサービス / Awarefy-AI-AWS-Bedrock-Step-Functions
iktakahiro
1
1.2k
Flutter アプリの将来のインフラ移行に備える 疎結合なソフトウェア・アーキテクチャ / Flutter code Architecture for Infrastructure Migration
iktakahiro
0
2.4k
[Amazon EKS on AWS Fargate] スタートアップの "次の3年" を支えるためのインフラ技術 / AWS DEV DAY EKS ON FARGATE
iktakahiro
2
1.9k
Other Decks in Programming
See All in Programming
はじめてのKubernetesコントリビューション
nasa9084
0
300
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
110
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
790
Debian JP Projectのサーバー構成
uwabami
1
170
AppFunctionsの内部実装を紐解く
hiroaki404
0
110
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
150
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
GraphQLとの向き合い方2022年版
quramy
50
15k
Become a Pro
speakerdeck
PRO
31
6.4k
Practical Orchestrator
shlominoach
192
12k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
570
How GitHub (no longer) Works
holman
316
150k
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
Ethics towards AI in product and experience design
skipperchong
2
470
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k