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
1.1k
2
Share
Argon2 を用いたハッシュ生成機能を提供するライブラリを pub.dev に公開した話 / Flutter Plugin Argon2 algorithm
Flutter Tokyo Meetup #16 の LT 資料です!
Takahiro Ikeuchi
August 11, 2021
More Decks by Takahiro Ikeuchi
See All by Takahiro Ikeuchi
TanStack Start エコシステムの現在地 / TanStack Start Ecosystem 2026
iktakahiro
1
290
TanStack Start 技術選定の裏側 / Findy-Lunch-LT-TanStack-Start
iktakahiro
5
2.6k
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
3
1.6k
最新のAIツールは何を解決しようとしているのか - Python エンジニアが取り組むべき "越境" とは - / Python-Engineer-in-AI-Era
iktakahiro
1
1.5k
AWS Step Functions と Amazon Bedrock で構築する 可用性の高いAIサービス / Awarefy-AI-AWS-Bedrock-Step-Functions
iktakahiro
1
1.1k
Flutter アプリの将来のインフラ移行に備える 疎結合なソフトウェア・アーキテクチャ / Flutter code Architecture for Infrastructure Migration
iktakahiro
0
2.3k
[Amazon EKS on AWS Fargate] スタートアップの "次の3年" を支えるためのインフラ技術 / AWS DEV DAY EKS ON FARGATE
iktakahiro
2
1.8k
可視化からはじめる ITエンジニアの セルフ・アウェアネス入門 / self-awareness-for-software-engineers
iktakahiro
0
610
Python で学ぶ実践的なドメイン駆動設計とレイヤードアーキテクチャ / DDD and Onion Architecture in Python
iktakahiro
19
28k
Other Decks in Programming
See All in Programming
存在論的プログラミング: 時間と存在を記述する
koriym
5
770
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
820
飯MCP
yusukebe
0
480
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
500
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
190
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
130
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
200
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
310
ファインチューニングせずメインコンペを解く方法
pokutuna
0
260
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
230
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.6k
Featured
See All Featured
Building an army of robots
kneath
306
46k
Prompt Engineering for Job Search
mfonobong
0
250
From π to Pie charts
rasagy
0
160
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Technical Leadership for Architectural Decision Making
baasie
3
310
Become a Pro
speakerdeck
PRO
31
5.9k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
190
Typedesign – Prime Four
hannesfritz
42
3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
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