Giter Club home page Giter Club logo

ariago's Introduction

ariago

ARIA implementation with Go

[개요]

  • ARIA 구현 (based on KISA's impl)
  • 현재 키 길이는 256bit만 지원
  • 모드는 ECB 모드만 지원
  • 키를 []byte, string 형태로 지정 가능

[사용 예제]

package main

import (
	"github.com/kernullist/ariago"	
	"fmt"
)

func main() {
	
	// Make a ariago instance with ECB mode
	aria := ariago.MakeARIA(ariago.ARIA_MODE_ECB)		
	if aria == nil {
		// Error
		return
	}
	
	// Master Key
	masterKey := "This is my Secret Key."
	if aria.SetMasterKeyWithString(masterKey) == false {
		// Error
		return
	}
	
	// Original Text
	originalText := "hello world!! this is a plain text"
	fmt.Printf("Original Text : %s\n", originalText)
	
	// Encrypt
	encryptedData := aria.Encrypt([]byte(originalText))
		
	// Decrypt	
	decryptedData := aria.Decrypt(encryptedData)
	
	fmt.Printf("Decrypted Data : %s\n", string(decryptedData))
}

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.