Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 /...
Search
Takahiro Ikeuchi
August 11, 2021
Programming
2
940
Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 / Flutter Plugin Argon2 algorithm
Flutter Tokyo Meetup #16 の LT 資料です!
Takahiro Ikeuchi
August 11, 2021
Tweet
Share
More Decks by Takahiro Ikeuchi
See All by Takahiro Ikeuchi
TanStack Start 技術選定の裏側 / Findy-Lunch-LT-TanStack-Start
iktakahiro
0
110
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
3
1.1k
最新のAIツールは何を解決しようとしているのか - Python エンジニアが取り組むべき "越境" とは - / Python-Engineer-in-AI-Era
iktakahiro
1
760
AWS Step Functions と Amazon Bedrock で構築する 可用性の高いAIサービス / Awarefy-AI-AWS-Bedrock-Step-Functions
iktakahiro
1
830
Flutter アプリの将来のインフラ移行に備える 疎結合なソフトウェア・アーキテクチャ / Flutter code Architecture for Infrastructure Migration
iktakahiro
0
2.1k
[Amazon EKS on AWS Fargate] スタートアップの "次の3年" を支えるためのインフラ技術 / AWS DEV DAY EKS ON FARGATE
iktakahiro
2
1.5k
可視化からはじめる ITエンジニアの セルフ・アウェアネス入門 / self-awareness-for-software-engineers
iktakahiro
0
510
Python で学ぶ実践的なドメイン駆動設計とレイヤードアーキテクチャ / DDD and Onion Architecture in Python
iktakahiro
17
25k
持続可能なエンジニアであるための 3つの こころがまえ / Be a Sustainable Engineer
iktakahiro
4
3.1k
Other Decks in Programming
See All in Programming
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
260
Beyond_the_Prompt__Evaluating__Testing__and_Securing_LLM_Applications.pdf
meteatamel
0
110
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
3
5.3k
最速Green Tea 🍵 Garbage Collector
kuro_kurorrr
1
100
JAWS DAYS 2025 re_Cheers: WEB
komakichi
0
110
API for docs
soutaro
4
1.7k
KANNA Android の技術的課題と取り組み
watabee
1
350
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
In geheimer Mission: AI Agents entwickeln
joergneumann
0
110
Designing Your Organization's Test Pyramid ( #scrumniigata )
teyamagu
PRO
5
1.3k
Bedrock × Confluenceで簡単(?)社内RAG
iharuoru
1
120
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Cult of Friendly URLs
andyhume
78
6.3k
Facilitating Awesome Meetings
lara
54
6.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
Typedesign – Prime Four
hannesfritz
41
2.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
560
The Language of Interfaces
destraynor
158
25k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Become a Pro
speakerdeck
PRO
28
5.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Transcript
© 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