Giter Club home page Giter Club logo

crypt_ng's Introduction

Crypt_NG

Overview

Microsoft WindowsのCNG版の暗号化・復号化のサンプルソース。
とりあえずAES128で試しに作成。 Sample encryption program using CNG of Microsoft Windows.

Concept

それぞれの関数は、単独で動くようにstatic関数で作成。
そのため、繰り返し実行する場合はプロバイダオブジェクトの取得や鍵のインポート等でオーバーヘッドが出る。
メンバ変数にハンドルなどを用意しておいて、インスタンス化するなどあると思うが、その辺りはお好みで。

処理の記述も、それぞれのステップを分かりやすくすること、メンテナンス性が高い(いじりやすい、改造しやすい)ことを主眼にしている。
そのため、速度やメモリの利用などの最適化を考える場合は、少々無駄がある。
流用する場合は、個々の事情に合わせて最適化することをおススメする。
(誰が見るんだ、こんなクソソース。)

Each function is created as a static function so that it can operate independently.
Therefore, if it is executed repeatedly, overhead will occur due to acquisition of provider object, import of key, etc.

Restriction

・エラー処理は十分ではない。
 (あくまでCNGの動作を確認するためのサンプルコード)
・大きなサイズのファイル/データについては考えていない。
・BCryptGenerateSymmetricKeyを使ったロジックまでは作っていない。(気が向いたら作るかもしれない。)

  • Error handling is not enough.
  • It does not support large files/data.
  • I don't create the logic using "BCryptGenerateSymmetricKey" in this time.

crypt_ng's People

Contributors

sachiel-archangel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.